aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <[email protected]>2018-11-04 17:37:07 +0100
committerFrederik Gladhorn <[email protected]>2018-11-05 18:21:57 +0100
commit66986d4afddcd09c28fe3addb0caa09279eda10f (patch)
tree736cf1143fc0ef95ff5f9867584beedfe97dc33e
parent47c84053888f4885e92976fa39b26a71a3cb746e (diff)
Make QPA think the tabbox is the active window
Summary: Without pretendingn to activate the Window, Qt will not send the right signals for accessibility, thus screen readers not working. Reviewers: kwin, davidedmundson Reviewed By: davidedmundson Subscribers: graesslin, davidedmundson Tags: #kwin Differential Revision: https://phabricator.kde.org/D16664
-rw-r--r--CMakeLists.txt1
-rw-r--r--tabbox/tabboxhandler.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 074d026..367e620 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -498,6 +498,7 @@ ecm_qt_declare_logging_category(kwin_KDEINIT_SRCS
)
if(KWIN_BUILD_TABBOX)
+ include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
set(
kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS}
tabbox/tabbox.cpp
diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp
index c14010e..501ef2d 100644
--- a/tabbox/tabboxhandler.cpp
+++ b/tabbox/tabboxhandler.cpp
@@ -42,6 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QQuickItem>
#include <QQuickWindow>
#include <X11/Xlib.h>
+#include <qpa/qwindowsysteminterface.h>
// KDE
#include <KLocalizedString>
#include <KProcess>
@@ -344,6 +345,8 @@ void TabBoxHandlerPrivate::show()
if (QWindow *w = window()) {
wheelAngleDelta = 0;
w->installEventFilter(q);
+ // pretend to activate the window to enable accessibility notifications
+ QWindowSystemInterface::handleWindowActivated(w, Qt::TabFocusReason);
}
#endif
}