Supress mouse events in KCMs causing window moves
ClosedPublic

Authored by davidedmundson on Sep 16 2019, 11:23 PM.

Details

Summary

If a mouse press is handled by the new input handlers the mouse evnet is
not accepted at a window level.

This causes the breeze style to start a window drag.

Marking all mouse events as accepted after being processed supresses
them reaching the widget.

This is noticable in the rewritten kscreen KCM when running on XCB. (it
would also affect wayland, but the breeze window management is currently
broken there)

Test Plan

Dragged a monitor in kscreen kcm. The monitor representation moved not the whole window

Diff Detail

Repository
R295 KCMUtils
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 16 2019, 11:23 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Sep 16 2019, 11:23 PM
anthonyfieroni added inline comments.
src/kcmoduleqml.cpp
265–268

Should we check if (rc && ...) if rc is false event is not handled no?

+1, fixes the bug.

romangg accepted this revision.Sep 19 2019, 12:11 PM
romangg added a subscriber: romangg.

Let's get it in the beta. But can you reply to @anthonyfieroni inline reply before pushing?

This revision is now accepted and ready to land.Sep 19 2019, 12:11 PM

Forgot that KCMUtils is part of Frameworks... And probably doesn't make sense to create a bug fix Frameworks release just for that. The KScreen KCM is still usable, just moving outputs is difficult but also possible. So just push for next Frameworks release.

This revision was automatically updated to reflect the committed changes.
davidedmundson marked an inline comment as done.