Hi,
This patch adds notification on window restacking. Plugins may need to
do something when that happens. For example, it is used in the new
version of animation plugin to perform a fade effect when a window
moves above or below other windows (in the plugin's settings this
effect is selected as a focus effect, but it's actually a restack
effect).
Regards,
Erkin
diff --git a/include/compiz.h b/include/compiz.h
index fa73e81..eba0aa7 100644
--- a/include/compiz.h
+++ b/include/compiz.h
@@ -1605,6 +1605,8 @@ typedef void (*WindowUngrabNotifyProc) (
typedef void (*WindowStateChangeNotifyProc) (CompWindow *window);
+typedef void (*WindowRestackNotifyProc) (CompWindow *window);
+
typedef void (*OutputChangeNotifyProc) (CompScreen *screen);
#define COMP_SCREEN_DAMAGE_PENDING_MASK (1 << 0)
@@ -1911,6 +1913,8 @@ struct _CompScreen {
WindowStateChangeNotifyProc windowStateChangeNotify;
+ WindowRestackNotifyProc windowRestackNotify;
+
OutputChangeNotifyProc outputChangeNotify;
CompPrivate *privates;
@@ -2581,6 +2585,9 @@ void
windowStateChangeNotify (CompWindow *w);
void
+windowRestackNotify (CompWindow *w);
+
+void
moveInputFocusToWindow (CompWindow *w);
void
diff --git a/src/screen.c b/src/screen.c
index 72a2240..6b9a934 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1702,6 +1702,8 @@ addScreen (CompDisplay *display,
s->windowStateChangeNotify = windowStateChangeNotify;
+ s->windowRestackNotify = windowRestackNotify;
+
s->outputChangeNotify = outputChangeNotify;
s->getProcAddress = 0;
diff --git a/src/window.c b/src/window.c
index 8554001..8cab91d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2342,6 +2342,8 @@ restackWindow (CompWindow *w,
else if (aboveId == None)
return 0;
+ (*w->screen->windowRestackNotify) (w);
+
unhookWindowFromScreen (w->screen, w);
insertWindowIntoScreen (w->screen, w, aboveId);
@@ -2721,6 +2723,10 @@ windowStateChangeNotify (CompWindow *w)
w->lastState = w->state;
}
+void windowRestackNotify (CompWindow * w)
+{
+}
+
static Bool
isGroupTransient (CompWindow *w,
Window clientLeader)
_______________________________________________
compiz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/compiz