summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-10-05 09:58:03 +0200
committerDanny Baumann <dannybaumann@web.de>2007-10-05 09:58:03 +0200
commit41122147aaff98bc25ffd9761de18bb7621b1147 (patch)
tree2a4c0d5a1c951eaeeb37200ffb1bdabe2ee66c80
parent7faf3a6a085cb70ffdfe5c3a5d746edb38ba0bfc (diff)
downloadworkarounds-41122147aaff98bc25ffd9761de18bb7621b1147.tar.gz
workarounds-41122147aaff98bc25ffd9761de18bb7621b1147.tar.bz2
We should remove the fullscreen flag while core processes a ConfigureRequest event.
Otherwise, addWindowSizeChanges will keep the window fullscreen, which means the app has no chance to unfullscreen itself.
-rw-r--r--workarounds.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/workarounds.c b/workarounds.c
index 28c72a1..5f74306 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -47,6 +47,7 @@ typedef struct _WorkaroundsScreen {
typedef struct _WorkaroundsWindow {
Bool adjustedWinType;
Bool madeSticky;
+ Bool madeFullscreen;
Bool isFullscreen;
} WorkaroundsWindow;
@@ -202,6 +203,7 @@ workaroundsFixupFullscreen (CompWindow *w)
if (isFullSize)
state |= CompWindowStateFullscreenMask;
+ ww->madeFullscreen = isFullSize;
if (state != w->state)
{
@@ -339,6 +341,16 @@ workaroundsHandleEvent (CompDisplay *d,
WORKAROUNDS_DISPLAY (d);
switch (event->type) {
+ case ConfigureRequest:
+ w = findWindowAtDisplay (d, event->xconfigurerequest.window);
+ if (w)
+ {
+ WORKAROUNDS_WINDOW (w);
+
+ if (ww->madeFullscreen)
+ w->state &= ~CompWindowStateFullscreenMask;
+ }
+ break;
case MapRequest:
w = findWindowAtDisplay (d, event->xmaprequest.window);
if (w)
@@ -359,6 +371,16 @@ workaroundsHandleEvent (CompDisplay *d,
WRAP (wd, d, handleEvent, workaroundsHandleEvent);
switch (event->type) {
+ case ConfigureRequest:
+ w = findWindowAtDisplay (d, event->xconfigurerequest.window);
+ if (w)
+ {
+ WORKAROUNDS_WINDOW (w);
+
+ if (ww->madeFullscreen)
+ w->state |= CompWindowStateFullscreenMask;
+ }
+ break;
case ClientMessage:
if (event->xclient.message_type == d->winDesktopAtom)
{
@@ -493,6 +515,7 @@ workaroundsInitWindow (CompPlugin *plugin, CompWindow *w)
ww->madeSticky = FALSE;
ww->adjustedWinType = FALSE;
ww->isFullscreen = FALSE;
+ ww->madeFullscreen = FALSE;
w->base.privates[ws->windowPrivateIndex].ptr = ww;