summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Riedi <andrewriedi@gmail.com>2007-07-25 19:13:47 -0700
committerAndrew Riedi <andrewriedi@gmail.com>2007-07-25 19:13:47 -0700
commit73abab980d8d19dcfad91d9bf8d55f727d751b3d (patch)
tree107cf3d963e7b0478c81e0d75fd9ee44c99c10b6
parent38cf96e2146c8b76cbeef25c6f4f50f441ab6159 (diff)
downloadworkarounds-73abab980d8d19dcfad91d9bf8d55f727d751b3d.tar.gz
workarounds-73abab980d8d19dcfad91d9bf8d55f727d751b3d.tar.bz2
Reset w->wmType when needed.
-rw-r--r--workarounds.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/workarounds.c b/workarounds.c
index 4a661f4..a95f02e 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -36,6 +36,8 @@ typedef struct _WorkaroundsScreen {
} WorkaroundsScreen;
typedef struct _WorkaroundsWindow {
+ Bool bOrigWmType;
+ unsigned int origWmType;
} WorkaroundsWindow;
#define GET_WORKAROUNDS_DISPLAY(d) \
@@ -96,6 +98,7 @@ workaroundsWindowResizeNotify (CompWindow *w, int dx, int dy,
static void
workaroundsWindowAddNotify (CompWindow *w)
{
+ WORKAROUNDS_WINDOW (w);
WORKAROUNDS_SCREEN (w->screen);
if (workaroundsGetLegacyApps (w->screen->display))
@@ -107,6 +110,8 @@ workaroundsWindowAddNotify (CompWindow *w)
w->attrib.override_redirect)
{
w->wmType = CompWindowTypeDropdownMenuMask;
+ ww->bOrigWmType = TRUE;
+ ww->origWmType = CompWindowTypeNormalMask;
}
}
@@ -186,12 +191,34 @@ workaroundsFiniScreen (CompPlugin *plugin, CompScreen *s)
static Bool
workaroundsInitWindow (CompPlugin *plugin, CompWindow *w)
{
+ WorkaroundsWindow *ww;
+
+ WORKAROUNDS_SCREEN (w->screen);
+
+ ww = malloc (sizeof (WorkaroundsWindow));
+ if (!ww)
+ return FALSE;
+
+ ww->bOrigWmType = FALSE;
+ ww->origWmType = 0;
+
+ w->privates[ws->windowPrivateIndex].ptr = ww;
+
return TRUE;
}
static void
workaroundsFiniWindow (CompPlugin *plugin, CompWindow *w)
{
+ WORKAROUNDS_WINDOW (w);
+
+ if (ww->bOrigWmType)
+ {
+ w->wmType = ww->origWmType;
+ recalcWindowType (w);
+ }
+
+ free (ww);
}
static Bool