Bug 462780 - Child pop-ups of window not included in "Window Under Cursor" and "Active Window" capture modes
Summary: Child pop-ups of window not included in "Window Under Cursor" and "Active Win...
Status: CONFIRMED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 22.08.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-08 12:12 UTC by Andrew Shark
Modified: 2023-01-17 03:07 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
How interface with additional checkbox for window with popup could look (604.39 KB, image/png)
2022-12-08 12:12 UTC, Andrew Shark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Shark 2022-12-08 12:12:50 UTC
Created attachment 154425 [details]
How interface with additional checkbox for window with popup could look

Currently there is no standard way to capture window including its popup menus. The only way to do it now is capturing the rectangle area. For example, I captured this attachment https://bugs.kde.org/show_bug.cgi?id=462702#c3 manually.

I wish such capture mode (window and also popups belonging to it) would be available.

It can be added as another Area (Active window with menu) or as an additional checkbox (Include window popup menus) applicable  to "Active Window" and "Window Under Cursor". I think the second one is more accurate. See screenshot of how it may look.

So with such option it will be comfortable for user to control if he wants to capture windows with or without menus, and use standard shortcuts every time (Meta + PrtScr).

SOFTWARE/OS VERSIONS
Spectacle: 22.08.3

ADDITIONAL INFORMATION
Snagit (a WinOS application) allows you to do such thing, see instruction here: https://support.techsmith.com/hc/en-us/articles/203731168-Capturing-a-Dropdown-Menu-in-Snagit-Windows
Comment 1 Nate Graham 2022-12-17 15:12:13 UTC
In Rectangular Region and Full Screen modes, this would not be needed, so really, it only makes sense for Window Under Cursor and Active Window modes. Instead, we should just do it this way by default, and not even need an option. Not doing it is a bug IMO.
Comment 2 Andrew Shark 2023-01-04 02:10:00 UTC
Agree, I also think it is ok to always capture a window with menu and remove an option to disable this (of course user still has a way to avoid menu capturing by just escaping it before taking screenshot).

I noticed that there are applications in which this _already_ works.
For example in Cuttlefish and in Elisa capturing window with menu works.
But other applications does not work this way. For example, Dolphin or Kate. Try to capture a window with menu. When cursor becomes aim shape to choose window, the popup disappears.
May this be a QtWidgets vs QtQuick application problem?
Comment 3 Noah Davis 2023-01-17 03:03:00 UTC
> Currently there is no standard way to capture window including its popup menus. The only way to do it now is capturing the rectangle area. For example, I captured this attachment https://bugs.kde.org/show_bug.cgi?id=462702#c3 manually.

You can also use something like Window Under Cursor if you set a delay, open the menu, then wait for the capture. It is annoying though. Maybe there's something we could do for Wayland in combination with some changes to KWin, but I don't think it's fixable on X11 because of how X11 treats popup menus.

> Snagit (a WinOS application) allows you to do such thing, see instruction here

Ironically, steps 5-7 for SnagIt are pretty much exactly what needs to be done with Spectacle in order to take a screenshot of a menu.

> 5. Enable Time Delay to set up additional time to open the menu to capture on the screen.
> 6. Select Delay and set number of seconds for delay.
> 7. Click Capture or press Print Screen.
> The countdown will then begin. Open the desired menu and move the cursor over the menu to capture.
Comment 4 Noah Davis 2023-01-17 03:07:56 UTC
(In reply to Andrew Shark from comment #2)
> I noticed that there are applications in which this _already_ works.
> For example in Cuttlefish and in Elisa capturing window with menu works.
> But other applications does not work this way. For example, Dolphin or Kate.
> Try to capture a window with menu. When cursor becomes aim shape to choose
> window, the popup disappears.
> May this be a QtWidgets vs QtQuick application problem?

Indeed, it is a Qt Widgets vs Qt Quick issue. In Qt Widgets, the menus are real popup menus. Qt Quick Controls 2 Menu is actually a part of its parent window which has the advantage of being easier to screenshot and the disadvantage of being impossible to stick outside the parent window. The disadvantage is usually felt when dealing with small windows or large menus.