After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771192 - Screenshots of Chromium use the wrong (non-maximized) window size
Screenshots of Chromium use the wrong (non-maximized) window size
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: window-management
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 765951 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-09-10 15:20 UTC by Mantas Mikulėnas (grawity)
Modified: 2018-02-23 13:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (82.83 KB, image/png)
2016-09-10 15:20 UTC, Mantas Mikulėnas (grawity)
Details

Description Mantas Mikulėnas (grawity) 2016-09-10 15:20:16 UTC
Created attachment 335253 [details]
screenshot

When trying to take a screenshot of a maximized Chromium window (CSD mode), the resulting screenshot is cropped to the size Chromium had _before_ maximization. See attached screenshot (note round corners).

This only affects 'window' screenshots, not whole-screen.

chromium ~53.x
mutter ~3.20.x/3.21.x
Comment 1 André Klapper 2016-09-10 16:48:14 UTC
> When trying to take a screenshot

What are your steps to take a screenshot?
Comment 2 Mantas Mikulėnas (grawity) 2016-09-10 17:56:16 UTC
(In reply to André Klapper from comment #1)
> > When trying to take a screenshot
> 
> What are your steps to take a screenshot?

I usually call gnome-shell's ScreenshotWindow() via D-Bus (that is, my screenshot-and-imgur script does).

(The script is at https://github.com/grawity/hacks/blob/master/desktop/cap)
Comment 3 Mantas Mikulėnas (grawity) 2016-09-10 18:23:33 UTC
(In reply to Mantas Mikulėnas from comment #2)
> (In reply to André Klapper from comment #1)
> > > When trying to take a screenshot
> > 
> > What are your steps to take a screenshot?
> 
> I usually call gnome-shell's ScreenshotWindow() via D-Bus (that is, my
> screenshot-and-imgur script does).
> 
> (The script is at https://github.com/grawity/hacks/blob/master/desktop/cap)

Short version: sleep 3 && gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell/Screenshot -m org.gnome.Shell.Screenshot.ScreenshotWindow true true true /tmp/shot.png

Just verified that Alt+PrintScreen is affected, too. (External tools such as 'maim' aren't.)

Also, forgot to mention – this is regular X11 (not Wayland/Xwayland).
Comment 4 Rui Matos 2016-09-14 15:49:19 UTC
I think this is a chrome bug, see https://bugs.chromium.org/p/chromium/issues/detail?id=641318
Comment 5 Mantas Mikulėnas (grawity) 2016-09-14 20:10:14 UTC
That seems very similar. Though in my case the window _is_ usually redrawn:

 - When I maximize Chrome, the whole window is fully drawn and usable, just not *screenshotable* (not even after using it for a while).

 - When I open the overview, Chrome does look 'cropped' for ~0.2sec but quickly flickers to regular (the same is particularly noticeable in the workspaces side panel).
Comment 6 Rui Matos 2016-10-04 07:36:04 UTC
*** Bug 765951 has been marked as a duplicate of this bug. ***
Comment 7 Mantas Mikulėnas (grawity) 2018-02-23 09:49:51 UTC
Appears to be fixed by:

https://gitlab.gnome.org/GNOME/mutter/commit/19bf4cf4f830d8bc3beaa8f9f61bc9adc13a1bbc