Implement support for window shortcuts for Wayland windows
ClosedPublic

Authored by graesslin on Jul 21 2017, 6:25 PM.

Details

Summary

Moves most of the implementation from Client to AbstractClient, so that
it can be used for both Client and ShellClient. Only the X11 specific
code is kept in Client.

Not yet implemented is updating the window caption.

Unfortunately the testing of this feature showed that setting a window
shortcut is not working on Wayland at all (the Qt widget doesn't properly
catch the shortcut). So this feature is currently only of erm theoretical
use.

Test Plan

Added new test case. No testing in real world as explained.

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.Jul 21 2017, 6:25 PM
Restricted Application added a project: KWin. · View Herald TranscriptJul 21 2017, 6:25 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript

FYI: I figured out why the shortcut dialog does not work. It's an incorrect construction of the QKeyEvent which KWin uses internally and sends to QWindows and various other places. We convert the current key symbol to Qt:: Key and when a modifier key is released that doesn't change and that destroys the logic of the QKeySequenceEdit.

No idea how to fix it yet.

FYI: I figured out why the shortcut dialog does not work. It's an incorrect construction of the QKeyEvent which KWin uses internally and sends to QWindows and various other places. We convert the current key symbol to Qt:: Key and when a modifier key is released that doesn't change and that destroys the logic of the QKeySequenceEdit.

Issue addressed in D6828.

mart accepted this revision.Jul 24 2017, 11:07 AM
This revision is now accepted and ready to land.Jul 24 2017, 11:07 AM
This revision was automatically updated to reflect the committed changes.