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 493182 - screenshot of a window can result in a 100% transparent image
screenshot of a window can result in a 100% transparent image
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.4.x
Other Linux
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2007-11-03 20:57 UTC by Ari Pollak
Modified: 2008-10-30 20:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example of the problem (212.38 KB, application/octet-stream)
2007-11-03 20:58 UTC, Ari Pollak
Details

Description Ari Pollak 2007-11-03 20:57:13 UTC
From Debian bug report http://bugs.debian.org/445445:

It seems that when selecting Acquire->Screenshot and choosing to grab a
single window with a border, for some windows a transparent image is created rather than an image of the window. This seems to happen on particular windows,
by which I mean that if you find a window with the problem, it's
repeatable, and if you find one that works, it always seems to work.

Attached is an example of the resulting image. If you use Anti-erase, you can see what the image is supposed to look like. The user appears to be running fluxbox.
Comment 1 Ari Pollak 2007-11-03 20:58:59 UTC
Created attachment 98484 [details]
example of the problem
Comment 2 Michael Schumacher 2007-11-03 21:29:00 UTC
Does it suddenly become visible if you change the zoom level?
Comment 3 Ari Pollak 2007-11-03 21:30:11 UTC
No, it's not a display problem - "If you use Anti-erase, you can see what the image is supposed to look like."
Comment 4 Sven Neumann 2007-11-04 10:46:20 UTC
Is this really with 2.4.0? This problem is supposedly fixed between 2.4.0-rc3 and 2.4.0. It was related to windows reporting a broken window shape. This problem is most likely caused by the window manager then. Please try to provide more information.
Comment 5 Ari Pollak 2007-11-04 16:10:27 UTC
Yes, the reporter originally had the problem with rc3, but reported that the same problem was still present on 2.4.0.
Comment 6 Sven Neumann 2007-11-04 17:40:49 UTC
What window manager is he using? Does this only happen with windows of a specific application? Is it still reproducable with 2.4.1?
Comment 7 Ari Pollak 2007-11-06 21:34:37 UTC
From the reporter:

In answer to your questions, I'm using enlightenment as my window
manager (specifically Debian package enlightenment 1:0.16.7.2-5), and
not fluxbox (though that was a good guess).

Most windows exhibit this problem. So far, in fact, all rectangular
windows that I've tried exhibit this problem. If I try an irregularly
shaped window (such a gkrellm) it all works fine. I've tried a large
number of rectangular windows and they all get displayed as transparent
images.

Also, it only appears to happen on windows with decorations added by
enlightenment. For example, running XMMS, enlightenment draws to window
decorations, and XMMS's window is captured and displayed correctly by
GIMP.

I've just fetched 2.4.1-1, and can confirm that the problem does indeed
still exist as described above. If I deselect "Include window
decoration", the part of the window without the decoration is always
captured correctly. From this, it does sound to me like there might be
a problem with enlightenment interacting with GIMP.
Comment 8 Sven Neumann 2007-11-08 17:27:55 UTC
I can't reproduce this problem. I have tried with enlightenment version 0.16.7.2 and the GIMP screenshot plug-in captures the windows nicely. It also takes the window shape into account and creates transparent rounded corners.

I assume that the bug reporter is not using the default enlightenment theme. Please give me enough information so that I can reproduce the problem.
Comment 9 Ari Pollak 2007-11-08 20:42:45 UTC
From submitter:

I'm using spiffE from quite some time ago. If it's useful, I'll be happy
to pack up the theme and send it over, just let me know.

I've just tried the same as a new user running Enlightenment with the
Winter theme, and the bug is not shown. However, with Winter, all
windows are non-rectangular, as the decorations are curved.

I decided to try a quick experiment. I kept gimp running, and switched
between spiffE and Winter themes. When running spiffE, the bug is
apparent with all windows with decorations. With Winter, the bug does
not occur.
Comment 10 Sven Neumann 2007-11-09 13:16:28 UTC
Is there an enlightenment theme packaged with debian that I can use to test this?
Comment 11 Sven Neumann 2007-11-09 18:01:42 UTC
Also somehow I still suspect that the bug reporter is not using the Screenshot plug-in from 2.4.0 but the buggy version that was shipped with 2.4.0-rc3. The described problem exactly matches the one that was fixed for 2.4.0. Is there certainly not a leftover installation of the 2.4 release candidate? Perhaps in /usr/local?
Comment 12 Ari Pollak 2007-11-12 01:30:04 UTC
The reporter seems to have only gimp 2.4.1 & associated libraries installed, and it seems to be using the correct path to the plugin. There isn't a package of spiffE available, but the theme is up here: http://download.freshmeat.net/themes/spiffe/spiffe-DR16.tar.gz; I think you can just extract it to ~/.enlightenment/themes/.
Comment 13 Sven Neumann 2007-11-13 19:21:05 UTC
I can reproduce the problem using enlightenment and this theme. A fix should follow soon...
Comment 14 Sven Neumann 2007-11-15 19:36:03 UTC
The enlightenment window manager is doing stupid things here. It uses a shaped window even though the window is completely rectangular. The shape actually consists of two rectangular regions that form the entire window.

Anyway, I have added a workaround for this problem to the screenshot plug-in. It is now more robust against such problems:

2007-11-15  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/screenshot.c: don't call gimp_edit_clear() if
	the selection mask is empty after selecting the window shape and
	inverting that selection. Fixes bug #493182.


/me uninstalls enlightenment again ...