mirror of
https://github.com/danog/patches.git
synced 2024-12-04 02:07:56 +01:00
18 lines
898 B
Diff
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);
|