Support modifier mouse/scroll action on internal decorated windows
ClosedPublic

Authored by graesslin on Feb 11 2018, 9:51 AM.

Details

Summary

This fixes the problem that alt+lmb did not start unrestricted move
resize for the Debug Console.

BUG: 374880
FIXED-IN: 5.12.1

Test Plan

New test case and manual testing whether alt+lmb/rmb works

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 created this revision.Feb 11 2018, 9:51 AM
Restricted Application added a project: KWin. · View Herald TranscriptFeb 11 2018, 9:51 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
graesslin requested review of this revision.Feb 11 2018, 9:51 AM
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptFeb 11 2018, 9:51 AM
Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptFeb 21 2018, 5:10 PM
romangg accepted this revision.Feb 25 2018, 12:25 AM
romangg added a subscriber: romangg.

Looks fine, but making this behavior dependent on isDecorated seems a bit hacky to me. Wouldn't be a separate property for this better? Are all internal windows without decoration not movable? What if we want to do it this way at some point in the future? We just shouldn't forget about this check here then.

This revision is now accepted and ready to land.Feb 25 2018, 12:25 AM
Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptFeb 25 2018, 12:25 AM

Looks fine, but making this behavior dependent on isDecorated seems a bit hacky to me. Wouldn't be a separate property for this better? Are all internal windows without decoration not movable? What if we want to do it this way at some point in the future? We just shouldn't forget about this check here then.

KWin internal windows are a bit special. Traditionally KWin was not able to manage it's own windows which means on X11 they were override redirect. Due to that they are not movable. The first ever internal window which is not falling under the constraints is the DebugConsole. But also only on Wayland. On X11 it has the same restrictions as on Wayland. Due to the restrictions for internal windows I consider it as highly unlikely that we will extend this in future. The main difference between a normal internal window and the DebugConsole internal window is that it is decorated. Other internal windows which are not decorated are also not going to be movable. What we currently have are things like the OSD, Overlay, etc. All of them not movable. "Real" windows are normally done through spawning a dedicated child process (examples: window killer, dialog for fullscreen windows, etc.). This is probably also not going to change.

So yes the whole thing is kind of hacky, but I think it is acceptable.

Restricted Application edited projects, added KWin; removed Plasma. · View Herald TranscriptFeb 25 2018, 1:32 PM
This revision was automatically updated to reflect the committed changes.