summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Riedi <andrewriedi@gmail.com>2007-06-14 01:44:15 -0700
committerAndrew Riedi <andrewriedi@gmail.com>2007-06-14 01:44:15 -0700
commit6cb55bb1e6daaa99743ea260510a1ec8868de289 (patch)
treef30bc6d5fb06d20ed08cd5dfa91dc004104262e4
parente1a3aa272420d01cbfc0ff4e0c047360dbfa5d5e (diff)
downloadworkarounds-6cb55bb1e6daaa99743ea260510a1ec8868de289.tar.gz
workarounds-6cb55bb1e6daaa99743ea260510a1ec8868de289.tar.bz2
Split workaroundsInitWindow() into two functions.
-rw-r--r--workarounds.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/workarounds.c b/workarounds.c
index d528b71..f5c015c 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -59,6 +59,21 @@ typedef struct _WorkaroundsWindow {
GET_WORKAROUNDS_DISPLAY (w->screen->display)))
+static void workaroundsDoLegacyApps( CompWindow *w )
+{
+ unsigned int type;
+
+ type = w->wmType;
+
+ /* Some code to make Wine and legacy applications work. */
+ if (w->width == w->screen->width && w->height == w->screen->height &&
+ !(w->type & CompWindowTypeFullscreenMask) &&
+ !(type & CompWindowTypeDesktopMask))
+ type = CompWindowTypeFullscreenMask;
+
+ w->type = type;
+}
+
static void workaroundsWindowResizeNotify( CompWindow *w, int dx, int dy,
int dwidth, int dheight )
{
@@ -149,19 +164,7 @@ static void workaroundsFiniScreen( CompPlugin *plugin, CompScreen *s )
static Bool workaroundsInitWindow( CompPlugin *plugin, CompWindow *w )
{
if ( workaroundsGetLegacyApps( w->screen->display ) )
- {
- unsigned int type;
-
- type = w->wmType;
-
- /* Some code to make Wine and legacy applications work. */
- if (w->width == w->screen->width && w->height == w->screen->height &&
- !(w->type & CompWindowTypeFullscreenMask) &&
- !(type & CompWindowTypeDesktopMask))
- type = CompWindowTypeFullscreenMask;
-
- w->type = type;
- }
+ workaroundsDoLegacyApps( w );
return TRUE;
}