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
This commit is contained in:
parent
47c8405388
commit
66986d4afd
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue