XShmGetImage returns junk/garbage in between monitors
Submitted by Nicholas Wilson
Assigned to Xorg Project Team
Description
Created attachment 88039 Screenshot of fullscreen on multimonitor system
In xserver 1.14.3, we've observed that on multimonitor systems, we are passed garbage when grabbing the pixels that are not on any monitor.
This does not appear to be a bug in our application - it can be easily reproduced by taking a screenshot of the whole screen using GIMP on Ubuntu 13.10 or Fedora 19. It seems to be a problem with the upstream server given the problem exists on both Ubuntu and Fedora.
The issue is not present in 1.13.3, and is present in both Fedora 19 (xserver 1.14.3) and Ubuntu 13.10 (xserver 1.14.3 with huge patchset).
What we are doing: get the geometry of the root window (XGetGeometry), create a pixbuf of the same size (XShmCreateImage/XShmAttach). Then we try and grab the whole thing using XShmGetImage.
On multimonitor systems, the off-monitor portions are filling in the pixbuf with garbage (or garbled portions of other sections of the screen). That is, the monitors themselves are captured fine, but if the second monitor is smaller than the first, we used to get a black box in the dead space, where now we're getting garbage.
I attempted to track down the source of the regression - a stab in the dark might be f21cc327?
Attachment 88039, "Screenshot of fullscreen on multimonitor system":
Version: 7.7 (2012.06)