GNOME Bugzilla – Bug 78040
thumbnail the screen in workspace switcher
Last modified: 2018-01-24 13:12:07 UTC
In the gnome 1.4 workspace switcher you could have screenshots of each screen that changed dynamically as windows were moved around. This is a regression in 2.0.
I don't intend to implement this until it can be done more reliably and with less CPU usage than in 1.4. It could not be turned on by default in 1.4 because it was too flaky and used too much CPU. I've asked Keith Packard about an X extension to support it. In the meantime I prefer displaying the icon for each window instead of a screenshot. It could also be done for some windows by adding toolkit support to GTK. Anyway, long term project.
*** Bug 78875 has been marked as a duplicate of this bug. ***
*** Bug 92454 has been marked as a duplicate of this bug. ***
Has anything happened wrt the X extensions since this comment?
Created attachment 31501 [details] File showing how to use Render and Damage in this context, for future reference With the latest X.org server it should be straightforward to implement this feature. Probably: - keep a pixmap per-workspace - while the space is active, thumbnail the windows on the screen to the pixmap - you probably want to do the thumbnail by walking through windows and copying the screen region for each window to the pixmap, so you only get windows, not desktop background. In other words don't just draw the whole screen to the pixmap. Alternately could draw the whole screen with a clip region that is the union of all the window rects (probably this is a lot faster...)
Created attachment 31523 [details] Updated version This patch has some extra code to try and avoid self-inflicted damage. It doesn't quite work, though; CPU usage is still 100% with some graphical evidence of the recursion stuff happening. This version also shows an X server bug where clipped-out pixels of the source image are black instead of transparent, and thus the thumbnail keeps getting blacked out.
I wonder if repainting in a timeout of a couple seconds or something like that would be a good idea, to throttle the amount of CPU used.
Moving to right component. Sorry for the spam.
For other working implementations of getting live window/workspace previews see Skippy http://thegraveyard.org/skippy.php Kompase http://kompose.berlios.de/ Backstep http://backstep.sourceforge.net/ In particular, some code may be able to be taken from skippy-XD
Sorry for the spam. I just tested the implementation in backstep and it also works well
Created attachment 90133 [details] Updateder version. Here's a version of Havoc's attachment in comment #6 that has a timeout, but on my machine it's not a magic bullet - my CPU is steady at 80% instead of 100%, but it's still prohibitive. I suspect that XComposite would speed things up immensely, but unfortunately you can't redirect a root window, only it's children (AFAICT). I wrote an experimental hack (around where td->root_picture is created, if you pass in a top-level window's XID rather than the root window's XID to XRenderCreatePicture, *and* you turn on XCompositeRedirectSubwindows on the root) and things just hum wicked-fast.
Since comment #9 gave a bunch of links, I should also mention that superswitcher (as of revision 26) does window previews (albeit imperfectly, at the moment). I blogged about it at http://blogs.gnome.org/nigeltao/2007/06/17/p1mp-my-switcher/
Thanks for the update, Nigel! Of course, you're welcome to continue working on this ;-)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libwnck/issues/5.