[beryl-commits] compiz mirror: Changes to 'master' (f5aae2667806553b1593f4a792da62c1f7d3bc89)

compiz at server.beryl-project.org compiz at server.beryl-project.org
Fri Jun 8 09:49:46 CEST 2007


New commits:
commit f5aae2667806553b1593f4a792da62c1f7d3bc89
Author: Danny Baumann <dannybaumann at web.de>
Date:   Fri Jun 8 09:32:37 2007 +0200

    Added compiz event indicating that switcher is active.
    While other plugins can also hook into the scale plugin to get this kind of information, that might be unwanted sometimes (e.g. to not introduce plugin dependencies). Because of that, it makes sense to have a inactive/active indicator independent of the hook interface.


 plugins/scale.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)


Modified: compiz/plugins/scale.c
===================================================================
--- compiz/plugins/scale.c
+++ compiz/plugins/scale.c
@@ -144,6 +144,23 @@ isScaleWin (CompWindow *w)
 }
 
 static void
+scaleActivateEvent (CompScreen *s,
+		    Bool       activating)
+{
+    CompOption o[2];
+
+    o[0].type = CompOptionTypeInt;
+    o[0].name = "root";
+    o[0].value.i = s->root;
+
+    o[1].type = CompOptionTypeBool;
+    o[1].name = "active";
+    o[1].value.b = activating;
+
+    (*s->display->handleCompizEvent) (s->display, "scale", "activate", o, 2);
+}
+
+static void
 scalePaintDecoration (CompWindow	      *w,
 		      const WindowPaintAttrib *attrib,
 		      const CompTransform     *transform,
@@ -1008,6 +1025,8 @@ scaleTerminate (CompDisplay     *d,
 		ss->grabIndex = 0;
 	    }
 
+	    scaleActivateEvent (s, FALSE);
+
 	    if (ss->dndTarget)
 		XUnmapWindow (d->display, ss->dndTarget);
 
@@ -1145,6 +1164,8 @@ scaleInitiateCommon (CompScreen      *s,
 
 	ss->state = SCALE_STATE_OUT;
 
+	scaleActivateEvent (s, TRUE);
+
 	damageScreen (s);
     }
 



More information about the commits mailing list