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 78040 - thumbnail the screen in workspace switcher
thumbnail the screen in workspace switcher
Status: RESOLVED OBSOLETE
Product: libwnck
Classification: Core
Component: pager
0.x
Other Linux
: Normal minor
: future
Assigned To: libwnck maintainers
libwnck maintainers
: 78875 92454 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-04-08 08:02 UTC by Dave Bordoley [Not Reading Bug Mail]
Modified: 2018-01-24 13:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
File showing how to use Render and Damage in this context, for future reference (9.44 KB, application/octet-stream)
2004-09-12 05:28 UTC, Havoc Pennington
Details
Updated version (13.31 KB, application/octet-stream)
2004-09-13 04:12 UTC, Havoc Pennington
Details
Updateder version. (13.78 KB, text/plain)
2007-06-17 12:03 UTC, Nigel Tao
Details

Description Dave Bordoley [Not Reading Bug Mail] 2002-04-08 08:02:25 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.
Comment 1 Havoc Pennington 2002-04-12 18:23:24 UTC
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.
Comment 2 Håvard Wigtil 2002-04-19 12:07:31 UTC
*** Bug 78875 has been marked as a duplicate of this bug. ***
Comment 3 Dave Bordoley [Not Reading Bug Mail] 2002-09-11 01:56:56 UTC
*** Bug 92454 has been marked as a duplicate of this bug. ***
Comment 4 Kjartan Maraas 2004-04-18 20:49:41 UTC
Has anything happened wrt the X extensions since this comment?
Comment 5 Havoc Pennington 2004-09-12 05:28:32 UTC
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...)
Comment 6 Havoc Pennington 2004-09-13 04:12:41 UTC
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.
Comment 7 Havoc Pennington 2004-09-13 04:18:40 UTC
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.
Comment 8 Vincent Noel 2005-01-28 15:08:58 UTC
Moving to right component. Sorry for the spam.
Comment 9 John Stowers 2006-12-17 23:55:10 UTC
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
Comment 10 John Stowers 2006-12-18 00:07:46 UTC
Sorry for the spam. 

I just tested the implementation in backstep and it also works well
Comment 11 Nigel Tao 2007-06-17 12:03:50 UTC
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.
Comment 12 Nigel Tao 2007-06-17 12:06:23 UTC
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/
Comment 13 Vincent Untz 2007-06-17 16:35:33 UTC
Thanks for the update, Nigel! Of course, you're welcome to continue working on this ;-)
Comment 14 GNOME Infrastructure Team 2018-01-24 13:12:07 UTC
-- 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.