summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-07-28 15:00:47 +0200
committerDanny Baumann <dannybaumann@web.de>2007-07-28 15:00:47 +0200
commit090c139bbde7c6f6fa7537bdafd15eaec52a2153 (patch)
tree431b4c56865a8d3269832483ecd67d9bbf389529
parent99d2831d90691ae066d920ab244e9a400bfa8117 (diff)
downloadworkarounds-090c139bbde7c6f6fa7537bdafd15eaec52a2153.tar.gz
workarounds-090c139bbde7c6f6fa7537bdafd15eaec52a2153.tar.bz2
Cleanup.
-rw-r--r--workarounds.c41
1 files changed, 1 insertions, 40 deletions
diff --git a/workarounds.c b/workarounds.c
index 17858df..c8f9f17 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -35,15 +35,10 @@ typedef struct _WorkaroundsDisplay {
} WorkaroundsDisplay;
typedef struct _WorkaroundsScreen {
- int windowPrivateIndex;
-
WindowAddNotifyProc windowAddNotify;
WindowResizeNotifyProc windowResizeNotify;
} WorkaroundsScreen;
-typedef struct _WorkaroundsWindow {
-} WorkaroundsWindow;
-
#define GET_WORKAROUNDS_DISPLAY(d) \
((WorkaroundsDisplay *) (d)->privates[displayPrivateIndex].ptr)
@@ -57,13 +52,6 @@ typedef struct _WorkaroundsWindow {
WorkaroundsScreen *ws = GET_WORKAROUNDS_SCREEN (s, \
GET_WORKAROUNDS_DISPLAY (s->display))
-#define GET_WORKAROUNDS_WINDOW(w, ws) \
- ((WorkaroundsWindow *) (w)->privates[(ws)->windowPrivateIndex].ptr)
-
-#define WORKAROUNDS_WINDOW(w) \
- WorkaroundsWindow *ww = GET_WORKAROUNDS_WINDOW (w, \
- GET_WORKAROUNDS_SCREEN (w->screen, \
- GET_WORKAROUNDS_DISPLAY (w->screen->display)))
static char *
workaroundsGetWindowRoleAtom (CompWindow *w)
@@ -269,13 +257,6 @@ workaroundsInitScreen (CompPlugin *plugin, CompScreen *s)
if (!ws)
return FALSE;
- ws->windowPrivateIndex = allocateWindowPrivateIndex (s);
- if (ws->windowPrivateIndex < 0)
- {
- free (ws);
- return FALSE;
- }
-
WRAP (ws, s, windowAddNotify, workaroundsWindowAddNotify);
WRAP (ws, s, windowResizeNotify, workaroundsWindowResizeNotify);
@@ -295,31 +276,11 @@ workaroundsFiniScreen (CompPlugin *plugin, CompScreen *s)
free (ws);
}
-static Bool
-workaroundsInitWindow (CompPlugin *plugin, CompWindow *w)
-{
- WorkaroundsWindow *ww;
-
- WORKAROUNDS_SCREEN (w->screen);
-
- ww = malloc (sizeof (WorkaroundsWindow));
- if (!ww)
- return FALSE;
-
- w->privates[ws->windowPrivateIndex].ptr = ww;
-
- return TRUE;
-}
-
static void
workaroundsFiniWindow (CompPlugin *plugin, CompWindow *w)
{
- WORKAROUNDS_WINDOW (w);
-
w->wmType = getWindowType (w->screen->display, w->id);
recalcWindowType (w);
-
- free (ww);
}
static Bool
@@ -372,7 +333,7 @@ CompPluginVTable workaroundsVTable =
workaroundsFiniDisplay,
workaroundsInitScreen,
workaroundsFiniScreen,
- workaroundsInitWindow,
+ 0, /* InitWindow */
workaroundsFiniWindow,
0, /* GetDisplayOptions */
0, /* SetDisplayOption */