Bug 390787 - Using "Capture the current pop-up only" captures wrong area when compositing is disabled
Summary: Using "Capture the current pop-up only" captures wrong area when compositing ...
Status: CONFIRMED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 17.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-20 14:28 UTC by null
Modified: 2019-05-14 15:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description null 2018-02-20 14:28:59 UTC
Trying to capture a popup like the "Help" menu or the context menu in Kate (2 seconds delay, "Capture the current pop-up only" checked) will:
- show an incorrect area of the screen with compositing off (which this bug shall be about)
- cause Spectacle to get stuck with compositing on (this is tracked in Bug 374864)

Depending on where the context menu is opened in relation to the parent window and where the cursor hovers when taking the screenshot, "incorrect area" can mean:
- null image
- parent window including context menu
- screenshot sized like the menu, but showing parts of the parent window
- screenshot sized like the menu, but showing bottom part of parent window as well as parts of the desktop and possibly the desktop panel

The problem might be related how "Window under Cursor" includes parent/child windows of the active application.
Comment 1 David Redondo 2019-05-14 15:09:49 UTC
Still happening. This is the non-kwin codepath in grabWindowunderCursor in PlatformXcb.cpp i.e. grabApplicationWindow. To reproduce take a screenshot with mode set to window under cursor with current pop-up only checked and uncheck include window titlebar and borders. Unchecking this box forces the non-kwin path.