GNOME Bugzilla – Bug 166485
Screenshot applet does not display correctly on multihead display
Last modified: 2009-02-24 21:52:15 UTC
When a screenshot it taken on a multihead display (I have dual setup using nVidia's twinview extension) the popup dialogue box to save the image is twice as wide as it should be. The left half consists of the usual image, path and save buttons whilst the right half is just a blank area. There is no loss in functionality however it looks rtaher odd, and ought to be fixed.
Moving to gnome-utils.
I'm seeing the same thing. Left half is the image of my left screen. Right half is blank. I would expect the right half should be the image of my right screen, so I disagree with mallchin@blueyonder.co.uk - it appears, there is a loss of functionality. Using gnome 2.10.0 on an Nvidia card with xinerama.
The screenshot is the correct size for me and contains an image of both displays, it's only the box that appears too large. I suspect twinview tricks X into thinking there is only 1 screen not 2 (unlike xinerama) thus (if it where only looking at one screen) it renders the image okay.
I have Xinerama and two different graphics cards and get the same problem, Screenshot: http://fornax.x3n.me.uk/Screenshot-Save%20Screenshot.png
the ubuntu bugzilla has a bug about this too: https://bugzilla.ubuntu.com/10600 "The gnome-screenshot utility doesn't handle multiple monitors (using Ximerama) correctly. It creates a .png of the correct dimensions, but only captures the contents of a single montior, and some of the other. This is what it captured of my desktop: http://diamond.nonado.net/misc/gnome-screenshot-badness.png here's what my desktop really looks like: http://diamond.nonado.net/misc/real.png I have an asymetric setup, with 1024x768 on the left monitor, and 1280x1024 on the right montior (a 17" crt and 17" lcd respectively). The gfx card is a geforce 6600GT, using the nvidia binary drivers. This is an amd64 machine, running hoary, uptodate as of today."
Fixed for me in Gnome-2.10 :)
*** Bug 313957 has been marked as a duplicate of this bug. ***
*** Bug 314668 has been marked as a duplicate of this bug. ***
Confirming because of the duplicates.
Still fixed for me using Xinerama...
One of the duplicates was with 2.11.x.
It did work for me with gnome 2.8.x and gnome 2.10.x. (I reported the bug 314668)
Created attachment 53486 [details] My xorg config with dual screen setup
Created attachment 53487 [details] Screen shot from a fresh garnome build I have the same problem listed above, I hope with more info a solution can be found.
Same bug here using gentoo ~x86 (say unstable). Using xorg-x11-6.8.2-r6, gnome-2.12 et the free driver of a radeon 9000 pci card. Xinerama with symetric conf (2x17") It is a regression since it worked for me in 2.6, 2.8 and 2.10 http://clubnix.esiee.fr/~eva/buggy-shot.png By the way you can actually see a bug of evolution-2.4 on the top of the screenshot :)
New comment from: https://bugzilla.ubuntu.com/10600 > Do you have the issue with Ubuntu 5.10? That could be a Build-Depends difference > with Debian... Sorry for the delay, took me ages to get a chance to install breezy on this machine. Anyway, short answer is, same bug still exists. Here's a fresh screenshot, from breezy: http://diamond.nonado.net/misc/pics/gnome-screenshot-badness-breezy.png (Somebody please raise Version to 2.12.x - Ubuntu Breezy shipped with 2.12.1)
It seems that the bug is that gnome-screenshot takes the dimensions of the primary screen, and takes an image of that from, starting from pixel 0 to the left. If the primary screen is to the right, or they have different sizes, everything will be fscked. Anyway, it should get everything. It used to do that (2.6, 2.8 and 2.10), but have failed to work in 2.12 and (soon to be) 2.14. As this is a regression, it's really frustrating!
*** Bug 308842 has been marked as a duplicate of this bug. ***
*** Bug 333025 has been marked as a duplicate of this bug. ***
I'm still experiencing this bug on Gnome 2.14.2 (on Ubuntu 6.06). Please raise version. Also, the GIMP correctly captures the entire screenshot, so maybe someone could borrow code from there ;-) Thanks, Matthew
This bug ought to be closed and a new one opened for this issue. The original issue of the screenshot tool not displaying it's self correctly in mallchin@blueyonder.co.uk's report has been confirmed as fixed. New bug: http://bugzilla.gnome.org/show_bug.cgi?id=352379
Created attachment 111946 [details] [review] Fixes xinerama desktop screenshot to shoot the whole desktop Attach is the patch which fixes the symtom on gnume-utils-2.20.0.1 I think this is covering up the root cause of the issue. Which is that XShapeGetRectangles (GDK_DISPLAY() GDK_ROOT_WINDOW(), ...) returns a single rectangle for the root window that is only the first X screen. Either the code that assumes GDK_ROOT_WINDOW() gives you something that represents the entire desktop is incorrect, or XShapeGetRectangles() has a bug. I don't know which, I'm hoping someone on #gtk+ will direct me someplace useful...
Upon reflection I believe this is in fact the correct patch. This situation only comes up when taking a screenshot of the entire desktop. Whatever we do we have to check to see whether this is the GDK_ROOT_WINDOW(). We can do something funky like: screen_count = ScreenCount(GDK_DISPLAY ()); for(i = 0; i < screen_count; ++i) { rectanlges = XShapeGetRectangles (GDK_DISPLAY, RootWindow(GDK_DISPLAY(), i), ShapeBounding, &rectangle_count, &rectangle_order); /* etc... */ } I think this would be the wrong way to go. We can't handle non rectangular screens. If there are multiple screens of different sizes & resolutions we are going to have dead regions in the overall screenshot no matter what. Breaking the root window into multiple screens and stitching back together is needless complexity, there's no benefit there, and we have to check if the window passed in is the root window anyway so the patch does the check exactly once and minimises the the resultant headache.
duplicated by Bug 352379 ?
Created attachment 111970 [details] Screenshot taken after patch applied, c. 650kb
I don't have a xinerama set up, so I can't confirm this works. if it doesn't cause any regression I can apply, but I'd like confirmation by at least another user that the patch works.
Just tried out the attached patch, on OpenSolaris with gnome 2.24 stack installed and running xinerama, and this does indeed display the complete captured screen.
Created attachment 119618 [details] [review] updated patch to apply with gnome-utils 2.24.0 Updated patch to apply against the latest 2.24.0 code.
*** Bug 352379 has been marked as a duplicate of this bug. ***
Created attachment 128346 [details] [review] bgo166485-screenshot-randr-blank-areas.diff We also need this patch to blank out the invisible areas for non-rectangular multi-monitor setups. See https://bugzilla.novell.com/show_bug.cgi?id=381135 about this.
Snapshot is working well for me now in gnome-utils-2.24.1, was capturing just one monitor previously. I'm not sure which of 2.24.0 or 2.24.1 was the update that fixed this. Running radeon 9200, MergedFB, two same-sized monitors, XOrg 7.2 with open sourced radeon driver on Gentoo. Thanks
Federico, thanks for the patch please commit to trunk.
Committed both patches to trunk (r8432, r8433): 2009-02-24 Federico Mena Quintero <federico@novell.com> https://bugzilla.novell.com/show_bug.cgi?id=381135 http://bugzilla.gnome.org/show_bug.cgi?id=166485 * screenshot-utils.c (screenshot_get_pixbuf): If we are in a multi-monitor setup that is not rectangular (for example, if it is L-shaped due to monitors of different resolutions), we need to blank out the "invisible" areas from the rectangular root window. Otherwise, the screenshot will contain content that the user cannot actually see. Call a helper function to blank out these areas. (mask_monitors): New helper function. * screenshot-utils.c (screenshot_get_pixbuf): Don't try to shape the root window. Patch by Hal Ashburner <hal@ashburner.info>