Implement interactive window selection for Wayland platforms
ClosedPublic

Authored by graesslin on Nov 15 2016, 1:31 PM.

Details

Summary

The interactive window selection is implemented in InputRedirection
through a dedicated InputEventFilter. The InputEventFilter so far takes
care of pointer input and keyboard input. In addition it ensures that
keyboard and pointer focus is reset on start and on end.

With this change KillWindow now also works on Wayland, but only for X11
windows, as the Wayland variant is not yet implemented.

Test Plan

Tested in nested setup, auto-tests still needed

Diff Detail

Repository
R108 KWin
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 8160.Nov 15 2016, 1:31 PM
graesslin retitled this revision from to Implement interactive window selection for Wayland platforms.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptNov 15 2016, 1:31 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
broulik added inline comments.
input.cpp
488

Can this happen? You check for buttons being NoButton and then for button being RightButton?

1409

Where is that being cleaned up?

graesslin added inline comments.Nov 16 2016, 6:28 AM
input.cpp
488

Yes of course. QMouseEvent::buttons contains the buttons currently hold. So we test that no buttons are currently pressed. And QMouseEvent::button contains the button which generated the event.

So this tests that the right mouse button was released and no further button is hold.

1409

like all InputEventFilters in InputRedirection::~InputRedirection

sebas accepted this revision.Nov 16 2016, 4:21 PM
sebas added a reviewer: sebas.
This revision is now accepted and ready to land.Nov 16 2016, 4:21 PM
This revision was automatically updated to reflect the committed changes.