[server] Send keyboard leave when client destroys the focused surface
ClosedPublic

Authored by graesslin on Jul 13 2017, 3:49 PM.

Details

Summary

This is a change inspired by https://bugreports.qt.io/browse/QTBUG-61930.
When Qt closes a window due to a key press event it starts to repeat the
event as KWayland does not send a keyboard leave event. Weston on the
other hand does send out the keyboard leave. In my opinion it doesn't
make much sense to send out the keyboard leave in this situation and in
my opinion that is a client bug, but if it makes clients happy we can
send them the keyboard leave. Similar this should be done for pointer,
touch, etc.

BUG: 382280

Test Plan

Run the example added to the Qt bug and it worked fine

Diff Detail

Repository
R127 KWayland
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 13 2017, 3:49 PM
Restricted Application added projects: Plasma on Wayland, Frameworks. · View Herald TranscriptJul 13 2017, 3:49 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
graesslin planned changes to this revision.Jul 15 2017, 6:58 PM

Causes crash in KWayaland when closing a window.

graesslin updated this revision to Diff 16755.Jul 15 2017, 7:03 PM

Add nullptr check to prevent crash

Restricted Application edited projects, added Plasma; removed Plasma on Wayland. · View Herald TranscriptJul 15 2017, 7:03 PM
davidedmundson accepted this revision.Jul 15 2017, 7:09 PM
This revision is now accepted and ready to land.Jul 15 2017, 7:09 PM
This revision was automatically updated to reflect the committed changes.