Hi,

To fix the conflict between animation's "focus fade" and switcher, I
had to add an activate event to switcher, since in animation.c I need
to have an indication of the period from the moment alt-tab is pressed
to the moment the windows settle down back on the desktop.
otherScreenGrabExist doesn't work for this since it doesn't cover the
period between the moment the user releases alt and the moment the
windows settle down back on the desktop.

Regards,
Erkin
diff --git a/plugins/switcher.c b/plugins/switcher.c
index 3018711..5f769ce 100644
--- a/plugins/switcher.c
+++ b/plugins/switcher.c
@@ -504,6 +504,21 @@ isSwitchWin (CompWindow *w)
     return TRUE;
 }
 
+static void switchActivateEvent(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, "switcher", "activate", o, 2);
+}
+
 static int
 compareWindows (const void *elem1,
 		const void *elem2)
@@ -859,6 +874,8 @@ switchInitiate (CompScreen *s,
 	    }
 
 	    setSelectedWindowHint (s);
+
+	    switchActivateEvent(s, TRUE);
 	}
 
 	damageScreen (s);
@@ -921,6 +938,8 @@ switchTerminate (CompDisplay     *d,
 	    {
 		ss->selectedWindow = None;
 		ss->zoomedWindow   = None;
+
+		switchActivateEvent(s, FALSE);
 	    }
 	    else
 	    {
@@ -1417,6 +1436,8 @@ switchPreparePaintScreen (CompScreen *s,
 			    removeScreenGrab (s, ss->grabIndex, 0);
 			    ss->grabIndex = 0;
 			}
+
+			switchActivateEvent(s, FALSE);
 		    }
 		}
 		break;
_______________________________________________
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz

Reply via email to