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 741114 - shell-screenshot: Disable unredirection while taking screenshots
shell-screenshot: Disable unredirection while taking screenshots
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-12-04 14:39 UTC by drago01
Modified: 2015-01-15 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell-screenshot: Disable unredirection while taking screenshots (1.64 KB, patch)
2014-12-04 14:39 UTC, drago01
reviewed Details | Review
shell-screenshot: Disable unredirection while taking screenshots (6.71 KB, patch)
2014-12-04 19:44 UTC, drago01
none Details | Review
shell-screenshot: Disable unredirection while taking screenshots (6.52 KB, patch)
2014-12-04 19:46 UTC, drago01
committed Details | Review

Description drago01 2014-12-04 14:39:09 UTC
See patch.
Comment 1 drago01 2014-12-04 14:39:12 UTC
Created attachment 292125 [details] [review]
shell-screenshot: Disable unredirection while taking screenshots

Otherwise we grab wrong contents.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-12-04 15:05:48 UTC
Review of attachment 292125 [details] [review]:

Can you explain why exactly unredirection causes wrong contents to be taken?

::: src/shell-screenshot.c
@@ +179,3 @@
   g_assert (screenshot != NULL);
 
+

Extra whitespace.
Comment 3 drago01 2014-12-04 15:44:26 UTC
(In reply to comment #2)
> Review of attachment 292125 [details] [review]:
> 
> Can you explain why exactly unredirection causes wrong contents to be taken?

Well you want to take a screenshot of the screen the unredirected window is not drawn on in the buffer we read from so you see what is beneath the window (kparal experienced this when trying to screenshot anaconda). In case of a window screenshot the texture is very old and thus wrong.

This patch as is is wrong anyway as pointed out by Owen on IRC (needs to do the redirection before queuing the frame).
Comment 4 drago01 2014-12-04 19:44:33 UTC
Created attachment 292147 [details] [review]
shell-screenshot: Disable unredirection while taking screenshots

Otherwise we grab wrong contents.

---

Ok this one does the ununredirection (i.e redirection) before queuing the frame.
Comment 5 drago01 2014-12-04 19:46:23 UTC
Created attachment 292148 [details] [review]
shell-screenshot: Disable unredirection while taking screenshots

Otherwise we grab wrong contents.
Comment 6 drago01 2015-01-13 18:44:34 UTC
Pushed after IRC review.

Attachment 292148 [details] pushed as 76315fc - shell-screenshot: Disable unredirection while taking screenshots
Comment 7 Kamil Páral 2015-01-15 15:43:37 UTC
Yesterday I was trying to get some screenshots from a fullscreen OpenGL game using a printscreen key, and I ended up with screenshots of the windows behind the game, or a white screen. Hopefully this will fix that. Thanks.