Diffusion KWin 4651aa1d7959

[wayland] Unset focused keyboard surface when handling key event internally

Authored by graesslin on Aug 11 2016, 9:17 AM.

Description

[wayland] Unset focused keyboard surface when handling key event internally

Summary:
So far when KWin intercepted a key event a leave was not sent to the
Wayland surface currently having keyboard focus. This could result in
the Wayland application to start repeating keys. E.g.

  1. application gets key press event
  2. This triggers an internal window to show
  3. key release goes to KWin internal window
  4. application starts to repeat key as there is no release

With this change whenever KWin intercepts the key event e.g. due to

  • internal window
  • Effects grabbing key event
  • Tabbox

the focused keyboard surface is set to null, thus triggering a leave
event and the client not starting to repeat the event.

Reviewers: KWin, Plasma on Wayland

Subscribers: plasma-devel, kwin

Tags: Plasma on Wayland, KWin

Differential Revision: https://phabricator.kde.org/D2402