Hello,

I'm doing a C++ wrapper and I need the counterpart of WindowAddNotifyProc
Every plugin must be rebuild since CompScreen is modified, hence ABIVERSION 
should be changed as well.
Would it be possible to implement it ?

Patch attached

Pafy.
--- a/include/compiz.h
+++ b/include/compiz.h
@@ -1712,6 +1712,8 @@ typedef void (*WindowStateChangeNotifyProc) (CompWindow *window);

 typedef void (*WindowAddNotifyProc) (CompWindow *window);

+typedef void (*WindowRemoveNotifyProc) (CompWindow *window);
+
 typedef void (*OutputChangeNotifyProc) (CompScreen *screen);

 typedef void (*InitWindowWalkerProc) (CompScreen *screen,
@@ -2017,6 +2019,7 @@ struct _CompScreen {
     DamageCursorRectProc damageCursorRect;

     WindowAddNotifyProc    windowAddNotify;
+    WindowRemoveNotifyProc windowRemoveNotify;
     WindowResizeNotifyProc windowResizeNotify;
     WindowMoveNotifyProc   windowMoveNotify;
     WindowGrabNotifyProc   windowGrabNotify;
@@ -2814,6 +2817,9 @@ compareWindowActiveness (CompWindow *w1,
 void
 windowAddNotify (CompWindow *w);

+void
+windowRemoveNotify (CompWindow *w);
+

 /* plugin.c */

--- a/src/screen.c
+++ b/src/screen.c
@@ -1584,6 +1584,7 @@ addScreen (CompDisplay *display,
     s->damageCursorRect        = damageCursorRect;

     s->windowAddNotify    = windowAddNotify;
+    s->windowRemoveNotify = windowRemoveNotify;
     s->windowResizeNotify = windowResizeNotify;
     s->windowMoveNotify          = windowMoveNotify;
     s->windowGrabNotify   = windowGrabNotify;
--- a/src/window.c
+++ b/src/window.c
@@ -2169,6 +2169,8 @@ removeWindow (CompWindow *w)
            showOutputWindow (w->screen);
     }

+    (*w->screen->windowRemoveNotify) (w);
+
     windowFiniPlugins (w);

     freeWindow (w);
@@ -4799,3 +4801,8 @@ windowAddNotify (CompWindow *w)
     w->added = TRUE;
 }

+void
+windowRemoveNotify (CompWindow *w)
+{
+}
+
_______________________________________________
compiz mailing list
compiz@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/compiz

Reply via email to