summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Riedi <andrewriedi@gmail.com>2007-08-02 14:38:47 -0700
committerAndrew Riedi <andrewriedi@gmail.com>2007-08-02 14:46:08 -0700
commit7fb4969991be53f7df413a70be93966caf459c35 (patch)
tree2a62d85fc0b7aa41605d97bd0475914ee112f12b
parente3d2033d9c15241f73303b3ec60d6a3cafccd3d5 (diff)
downloadworkarounds-7fb4969991be53f7df413a70be93966caf459c35.tar.gz
workarounds-7fb4969991be53f7df413a70be93966caf459c35.tar.bz2
Merge workaroundsDoLegacyFullscreen() into workaroundsDoFixes().
-rw-r--r--workarounds.c56
1 files changed, 22 insertions, 34 deletions
diff --git a/workarounds.c b/workarounds.c
index 11167ea..41143e2 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -86,39 +86,6 @@ workaroundsGetWindowRoleAtom (CompWindow *w)
}
static void
-workaroundsDoLegacyFullscreen (CompWindow *w)
-{
- unsigned int type;
-
- type = w->type;
-
- /* Some code to make Wine and legacy applications work. */
- if (w->width == w->screen->width && w->height == w->screen->height &&
- !(type & CompWindowTypeDesktopMask))
- type = CompWindowTypeFullscreenMask;
-
- w->type = type;
-}
-
-static void
-workaroundsWindowResizeNotify (CompWindow *w, int dx, int dy,
- int dwidth, int dheight)
-{
- WORKAROUNDS_SCREEN (w->screen);
-
- if (workaroundsGetLegacyFullscreen (w->screen->display))
- {
- /* Fix up the window type. */
- recalcWindowType (w);
- workaroundsDoLegacyFullscreen (w);
- }
-
- UNWRAP (ws, w->screen, windowResizeNotify);
- (*w->screen->windowResizeNotify) (w, dx, dy, dwidth, dheight);
- WRAP (ws, w->screen, windowResizeNotify, workaroundsWindowResizeNotify);
-}
-
-static void
workaroundsDoFixes (CompWindow *w)
{
Bool appliedFix = FALSE;
@@ -203,7 +170,28 @@ workaroundsDoFixes (CompWindow *w)
recalcWindowType (w);
if (workaroundsGetLegacyFullscreen (w->screen->display))
- workaroundsDoLegacyFullscreen (w);
+ {
+ /* Some code to make Wine and legacy applications work. */
+ if (w->width == w->screen->width && w->height == w->screen->height &&
+ !(w->type & CompWindowTypeDesktopMask))
+ w->type = CompWindowTypeFullscreenMask;
+ }
+}
+
+static void
+workaroundsWindowResizeNotify (CompWindow *w, int dx, int dy,
+ int dwidth, int dheight)
+{
+ WORKAROUNDS_SCREEN (w->screen);
+
+ if (workaroundsGetLegacyFullscreen (w->screen->display))
+ {
+ workaroundsDoFixes (w);
+ }
+
+ UNWRAP (ws, w->screen, windowResizeNotify);
+ (*w->screen->windowResizeNotify) (w, dx, dy, dwidth, dheight);
+ WRAP (ws, w->screen, windowResizeNotify, workaroundsWindowResizeNotify);
}
static Bool