summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Riedi <andrewriedi@gmail.com>2007-07-25 17:26:46 -0700
committerAndrew Riedi <andrewriedi@gmail.com>2007-07-25 17:26:46 -0700
commitdfa31c4c74165dac16ca9a828c58a89573018457 (patch)
treeb256a469db4b94a467d78e08406f61d9047bdd02
parent4f724f1c6e2568f4569098a5e53fd450c9a87174 (diff)
downloadworkarounds-dfa31c4c74165dac16ca9a828c58a89573018457.tar.gz
workarounds-dfa31c4c74165dac16ca9a828c58a89573018457.tar.bz2
Add initial workaroundsWindowAddNotify().
-rw-r--r--workarounds.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/workarounds.c b/workarounds.c
index 1e32b2a..e5684bd 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -31,7 +31,8 @@ typedef struct _WorkaroundsDisplay {
typedef struct _WorkaroundsScreen {
int windowPrivateIndex;
- WindowResizeNotifyProc windowResizeNotify;
+ WindowAddNotifyProc windowAddNotify;
+ WindowResizeNotifyProc windowResizeNotify;
} WorkaroundsScreen;
typedef struct _WorkaroundsWindow {
@@ -90,6 +91,18 @@ static void workaroundsWindowResizeNotify( CompWindow *w, int dx, int dy,
WRAP( ws, w->screen, windowResizeNotify, workaroundsWindowResizeNotify );
}
+static void workaroundsWindowAddNotify (CompWindow *w)
+{
+ WORKAROUNDS_SCREEN (w->screen);
+
+ if ( workaroundsGetLegacyApps( w->screen->display ) )
+ workaroundsDoLegacyApps( w );
+
+ UNWRAP (ws, w->screen, windowAddNotify);
+ (*w->screen->windowAddNotify) (w);
+ WRAP (ws, w->screen, windowAddNotify, workaroundsWindowAddNotify);
+}
+
static Bool workaroundsInitDisplay( CompPlugin *plugin, CompDisplay *d )
{
WorkaroundsDisplay *wd;
@@ -136,6 +149,7 @@ static Bool workaroundsInitScreen( CompPlugin *plugin, CompScreen *s )
return FALSE;
}
+ WRAP( ws, s, windowAddNotify, workaroundsWindowAddNotify );
WRAP( ws, s, windowResizeNotify, workaroundsWindowResizeNotify );
s->privates[wd->screenPrivateIndex].ptr = ws;
@@ -147,6 +161,7 @@ static void workaroundsFiniScreen( CompPlugin *plugin, CompScreen *s )
{
WORKAROUNDS_SCREEN( s );
+ UNWRAP( ws, s, windowAddNotify );
UNWRAP( ws, s, windowResizeNotify );
free( ws );
@@ -154,9 +169,6 @@ static void workaroundsFiniScreen( CompPlugin *plugin, CompScreen *s )
static Bool workaroundsInitWindow( CompPlugin *plugin, CompWindow *w )
{
- if ( workaroundsGetLegacyApps( w->screen->display ) )
- workaroundsDoLegacyApps( w );
-
return TRUE;
}