1
0
mirror of https://github.com/danog/patches.git synced 2024-12-03 09:47:58 +01:00
patches/qtbase_5_12_8/0009-fix-build-on-ubuntu-1404.patch
Ilya Fedin 2b9afa7592 Separate patches
Backport support for opening directories with xdg desktop portals

Backport fix for ibus on wayland
2020-06-02 22:21:04 +04:00

18 lines
898 B
Diff

diff --git a/src/platformsupport/linuxaccessibility/constant_mappings.cpp b/src/platformsupport/linuxaccessibility/constant_mappings.cpp
index fce2919e73..4a7d0f7d92 100644
--- a/src/platformsupport/linuxaccessibility/constant_mappings.cpp
+++ b/src/platformsupport/linuxaccessibility/constant_mappings.cpp
@@ -79,7 +79,12 @@ quint64 spiStatesFromQState(QAccessible::State state)
if (state.checkStateMixed)
setSpiStateBit(&spiState, ATSPI_STATE_INDETERMINATE);
if (state.readOnly)
+// Patch: Support build with AT-SPI version below 2.16.
+#ifdef ATSPI_STATE_READ_ONLY
setSpiStateBit(&spiState, ATSPI_STATE_READ_ONLY);
+#else // ATSPI_STATE_READ_ONLY
+ unsetSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
+#endif // ATSPI_STATE_READ_ONLY
// if (state.HotTracked)
if (state.defaultButton)
setSpiStateBit(&spiState, ATSPI_STATE_IS_DEFAULT);