Collapse "Active Window" and "Window under Cursor" modes
Open, Needs TriagePublic

Description

Having these two modes be separate introduces a lot of issues due to their subtly different behaviors. We should consider collapsing them into a single mode that targets a window. As part of this initiative, we need to make sure we don't lose any pre-existing capture functionality.

How should the target window be specified? Always target the active window, the window under the cursor, or allow the user a chance to click on a window to target it? I have a light preference for the final option.

ngraham created this task.Feb 21 2018, 4:53 AM

How about the user clicks on a window and captures the window and all of its parents, but not the children.

In fact, Spectacle already has "click on a window to select it" mode.

This looks like it's in the implementation of the grabbing code itself. It obtains the rectangle defined by the window and captures that slice of the screen - overlapping windows and all. To get it right, I think the clicked-on window would have to be raised to the top and then captured. However, the KWin docs have a stern warning against using the API call to raise a window.

https://api.kde.org/frameworks/kwindowsystem/html/classKWindowSystem.html#a7a04fd62d97ed3104e02bfa3ffa19ad5