[server] Properly send a selection clear prior to keyboard focus enter
ClosedPublic

Authored by graesslin on Jul 5 2016, 9:01 AM.

Details

Summary

When setting the keyboard focus the server needs also to send the current
selection to the client. So far KWayland only sent the selection if it was
set. That is if the last focused client cleared the selection it was not
updated and the client might have had an outdated selection.

To prevent this situation the server now explicitly sends the clear to the
client on enter if there is no selection. Also if the selection is cleared,
the SeatInterface now unsets it's current selection to make sure that the
next focused keyboard will get the clear selection sent.

Test Plan

Existing test case adjusted and a new test case added which
simulates the interaction of two clients.

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 updated this revision to Diff 4955.Jul 5 2016, 9:01 AM
graesslin retitled this revision from to [server] Properly send a selection clear prior to keyboard focus enter.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma on Wayland.
Restricted Application added a project: Plasma on Wayland. · View Herald TranscriptJul 5 2016, 9:01 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas accepted this revision.Jul 12 2016, 9:27 PM
sebas added a reviewer: sebas.
This revision is now accepted and ready to land.Jul 12 2016, 9:27 PM
This revision was automatically updated to reflect the committed changes.