Capture all windows for "Window under cursor"
Review Request #129163 - Created Oct. 12, 2016 and submitted
Capture the correct area, not just the top-left one (bug 369330). Capture all possible related windows, not just the top-level (or the non-transient background window), this will correctly capture whole applications including the open menus (bug 357223). The last change also affects how windows with other overlapping ones are captured, previously the hidden area is shown as if there was no popup. For example, Kate would be captured and not its Open dialog. Tested with Kate (Qt 5): Open File -> Add Places Entry -> Select Icon. Verify that clicking all of these menus show the same screenshot and that the non-overlapping parts are shown. Right-click to open a context menu, this is also captured on the delayed screenshot. Tested with heimdall-frontend and Hedgewars (Qt 4): open a menu, keep the cursor on it. Verify that the menu and window are captured. Do the same, but with the cursor outside the menu. BUG: 369330 BUG: 357223
Testing as above. Other applications I tested with are:
- ImageMagick (
display x.png) with the preview area and the popup menu, this was the most X-ey program I could remember. It is still captured correctly.
- Cursor on the Plasma desktop wallpaper now shows the windows on it, not just the wallpaper.
- Firefox with an Open File dialog with cursor on the file dialog which covers an area outside the window. The previous logic would use the area of the parent window resulting in cutting sides from the file dialog. Now it captures the dialog plus Firefox itself.