[Differential] [Request, 36 lines] D2980: Add event filter for key press/release events while KWin grabbed keyboard on root window

graesslin (Martin Gräßlin) noreply at phabricator.kde.org
Fri Oct 7 14:36:24 UTC 2016


graesslin created this revision.
graesslin added reviewers: KWin, Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: kwin, plasma-devel.

REVISION SUMMARY
  The modifier-only-shortcuts break as soon as KWin grabs the keyboard
  (e.g. alt+tab, present windows, etc.). The investigation shows that in
  that case KWin does not get any raw key events any more and thus gets
  confused about the state of the hold modifiers. E.g. alt+tab has the
  alt key pressed, but we miss the release as the keyboard is grabbed.
  
  This change addresses the problem by installing an additional event
  filter for key press and release event which only filters for key events
  on the root window. That way we can be sure that it only operates when
  KWin grabbed the keyboard on the root window.
  
  Note: the problem only exists when grabbing on the root window. If the
  grab is on another window (e.g. moving a window) we still do get all
  events.
  
  The problem also seems to not happen if another application grabbed
  keys on the root window. E.g. for key combinations grabbed by
  kglobalaccel the correct sequence of key press/release as raw events
  are reported. Also while the screen is locked the evemts are reported
  and kscreenlocker grabs the keyboard on the root window.

TEST PLAN
  Used Alt+Tab and Present Windows and tried to activate launcher
  afterwards.

REPOSITORY
  rKWIN KWin

BRANCH
  mod-only-root-grabbed-keyboard

REVISION DETAIL
  https://phabricator.kde.org/D2980

AFFECTED FILES
  plugins/platforms/x11/standalone/xinputintegration.cpp
  plugins/platforms/x11/standalone/xinputintegration.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #kwin, #plasma
Cc: plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161007/14465481/attachment-0001.html>


More information about the Plasma-devel mailing list