Commit 66986d4a authored by Frederik Gladhorn's avatar Frederik Gladhorn

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
parent 47c84053
......@@ -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
......
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment