Diffusion KWin 7adf69decec2

Update Keyboard focus when the Surface of the active client changes

Authored by graesslin on Jun 26 2016, 1:57 PM.

Description

Update Keyboard focus when the Surface of the active client changes

Summary:
For XWayland windows the window might be activated before the Wayland
Surface is set for it. Thus the keyboard focus is not passed to the
window. Only on the next activate after the window got created the
window got keyboard focus.

This change addresses this problem by emitting a signal from Toplevel
when the surface changes. The KeyboardInput listens to this signal
for the active client and updates keyboard focus again if the surface
changes. Thus keyboard focus is properly passed to XWayland windows.

Test Plan:
Test case which creates an X11 window is adjusted to verify
the condition.

Reviewers: Plasma on Wayland, KWin

Subscribers: plasma-devel, kwin

Tags: Plasma on Wayland, KWin

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