Workaround Qt regression of no longer delivering events for the root window
ClosedPublic

Authored by graesslin on Jun 18 2017, 12:27 PM.

Details

Summary

With qtbase 2b34aefcf02f09253473b096eb4faffd3e62b5f4 we do no longer get
events reported for the X11 root window. Our keyboard handling in effects
like PresentWindows and DesktopGrid relied on that.

This change works around the regression by calling winId() on
qApp->desktop() as suggested in the change. This is a short term solution
for the 5.10 branch.

This needs to be addressed properly by no longer relying on Qt in this
area. KWin already does not rely on Qt for Wayland in that area and is
able to compose the QKeyEvents. This should also be done on X11. It just
needs some more hook up code for xkb, but that's needed anyway to improve
modifier only shortcuts and friends.

BUG: 360841
FIXED-IN: 5.10.3

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Jun 18 2017, 12:27 PM
Restricted Application added a project: KWin. · View Herald TranscriptJun 18 2017, 12:27 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
broulik accepted this revision.Jun 18 2017, 12:46 PM
broulik added a subscriber: broulik.

Fixes keyboard nav in present windows for me

This revision is now accepted and ready to land.Jun 18 2017, 12:46 PM
fvogt added a subscriber: fvogt.Jun 18 2017, 5:49 PM

What about the 5.8 branch? I'm not aware of any distros that use it with Qt 5.9, but IMO it needs to be fixed there as well.

In D6258#117243, @fvogt wrote:

What about the 5.8 branch? I'm not aware of any distros that use it with Qt 5.9, but IMO it needs to be fixed there as well.

I think it is not reasonable for a distribution to keep Plasma on LTS but update Qt to the latest. If a distro really wants they can backport the patch.

This revision was automatically updated to reflect the committed changes.