GNOME Bugzilla – Bug 493182
screenshot of a window can result in a 100% transparent image
Last modified: 2008-10-30 20:03:28 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.
Created attachment 98484 [details] example of the problem
Does it suddenly become visible if you change the zoom level?
No, it's not a display problem - "If you use Anti-erase, you can see what the image is supposed to look like."
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.
Yes, the reporter originally had the problem with rc3, but reported that the same problem was still present on 2.4.0.
What window manager is he using? Does this only happen with windows of a specific application? Is it still reproducable with 2.4.1?
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.
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.
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.
Is there an enlightenment theme packaged with debian that I can use to test this?
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?
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/.
I can reproduce the problem using enlightenment and this theme. A fix should follow soon...
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 ...