rjanja / desktop-capture

Screenshot and screencasting tools for Cinnamon.
40 stars 11 forks source link

Window screenshots are just black #11

Closed LunaticoCR closed 10 years ago

LunaticoCR commented 11 years ago

All Window screenshots generate just a black image.

rjanja commented 11 years ago

You're lucky to be seeing just black, I see an annoying mix of black & white distortion. There is something else at play here, as window screenshots are broken in this regard in both Cinnamon and Gnome-Shell with very particular versions of video drivers. The last nvidia driver I was able to get good window shots with was 295, and I've tested up to about 310.

The only immediate solution is to tick the [x] Capture window as area checkbox in the screenshot settings. It won't be as clean a screenshot, and may include windows behind it if the current window is semi-transparent, but at least it'll be usable.

LunaticoCR commented 11 years ago

Oh well if it's an upstream issue then it's out-of-scope. I'm on Nvidia 304.43 on a Linux x86. To be honest I wouldn't even bother to try and start changing video drivers just to get this feature working. When you think about it really, once you have the 'Area' screenshot working fine it makes this one a bit redundant. Now, all that said, I Googled a bit to find a proper bug upstream and found similar ones but they all refered to gnome-screenshot which lead me to test that a bit more separately from the applet. If I press Alt+PrtScn it works fine. If I open 'gnome-screenshot --interactive' and chose the 'Grab the current window' option it works fine. And if I run 'gnome-screenshot -w' it also works fine.

Is your applet using gnome-screenshot?

rjanja commented 11 years ago

What do you have Alt+PrtScn bound to?

"Cinnamon Screenshot" refers to built-in screen capture functionality that was first implemented in Gnome-Shell and later merged into Cinnamon. It doesn't use gnome-screenshot at all.

The problem here is that even though you're using gnome-screenshot, it's not actually using the same capture back-end. If you run it from a terminal window you will see a message like:

** (gnome-screenshot:24536): WARNING **: 
Unable to use GNOME Shell's builtin screenshot interface, resorting to fallback X11. 

Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: 
The name org.gnome.Shell was not provided by any .service files

This is due to gnome-screenshot not knowing how to connect to Cinnamon's capture back-end. If you instead were to log in choosing Gnome-Shell as your interface, gnome-screenshot _would_ connect to the capture back-end and almost assuredly would capture black/distorted window screenshots for both of our cases.

Here, gnome-screenshot is basically taking an area screenshot via X11 (noticeable by the background surrounding window corners) much in the same way as desktop-capture has to do to get around this issue. A normal window screenshot doesn't include any background, just visibly transparent areas.

And here's an example of bad window capture output from Cinnamon Screenshot or gnome-screenshot in gnome-shell: screenshot-window-2012-12-18-112718 This doesn't seem to affect everyone, just users of specific ATI & nVidia proprietary drivers.