summaryrefslogtreecommitdiff
path: root/plugins/compiztoolbox
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2009-12-07 20:39:55 +0800
committerSam Spilsbury <smspillaz@gmail.com>2009-12-07 20:39:55 +0800
commit05f393a959e13ba73e635916f4b9773792f93993 (patch)
tree1dfe40d6b1f7835a2d28fc3a633ae4599845a403 /plugins/compiztoolbox
parentbd4277475358ab99338db23b3203f3970961352a (diff)
downloadcompiz-with-glib-mainloop-05f393a959e13ba73e635916f4b9773792f93993.tar.gz
compiz-with-glib-mainloop-05f393a959e13ba73e635916f4b9773792f93993.tar.bz2
Add a showIconOnly () virtual function to BaseSwitchScreen so that switchers can show the icon of applications only when switching
Diffstat (limited to 'plugins/compiztoolbox')
-rw-r--r--plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h1
-rw-r--r--plugins/compiztoolbox/src/compiztoolbox.cpp6
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h b/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h
index 6c8b3e4..c93a5a4 100644
--- a/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h
+++ b/plugins/compiztoolbox/include/compiztoolbox/compiztoolbox.h
@@ -78,6 +78,7 @@ class BaseSwitchScreen
static Visual *findArgbVisual (Display *dpy, int scr);
virtual bool shouldShowIcon () { return false; }
+ virtual bool showIconOnly () { return false; }
virtual void windowRemove (CompWindow *w) {}
virtual void doWindowDamage (CompWindow *w);
virtual void handleSelectionChange (bool toNext, int nextIdx) {}
diff --git a/plugins/compiztoolbox/src/compiztoolbox.cpp b/plugins/compiztoolbox/src/compiztoolbox.cpp
index f8d1144..9765a1f 100644
--- a/plugins/compiztoolbox/src/compiztoolbox.cpp
+++ b/plugins/compiztoolbox/src/compiztoolbox.cpp
@@ -367,7 +367,11 @@ BaseSwitchWindow::paintThumb (const GLWindowPaintAttrib &attrib,
int width2,
int height2)
{
+
+
GLWindowPaintAttrib sAttrib (attrib);
+ bool onlyIcon = (gWindow->textures ().empty () ||
+ baseScreen->showIconOnly ());
int wx, wy;
float width, height;
GLTexture *icon = NULL;
@@ -381,7 +385,7 @@ BaseSwitchWindow::paintThumb (const GLWindowPaintAttrib &attrib,
gWindow->bind ();
}
- if (!gWindow->textures ().empty ())
+ if (!onlyIcon)
{
GLMatrix wTransform (transform);
int ww, wh;