summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Riedi <andrewriedi@gmail.com>2007-06-07 20:50:33 -0700
committerAndrew Riedi <andrewriedi@gmail.com>2007-06-07 20:50:33 -0700
commit06a8cf827e8531cb9b2538e35b82a8aabdb65f61 (patch)
tree3e69231aee2d37a79e6c9e4f59071e6b9798eb00
parent003891f9d58d7cd9ed88e111f7752d3d2a1d0396 (diff)
downloadworkarounds-06a8cf827e8531cb9b2538e35b82a8aabdb65f61.tar.gz
workarounds-06a8cf827e8531cb9b2538e35b82a8aabdb65f61.tar.bz2
Add workaround for Wine and legacy applications.
-rw-r--r--workarounds.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/workarounds.c b/workarounds.c
index bece602..32ed402 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -23,6 +23,27 @@
static CompMetadata workaroundsMetadata;
static int displayPrivateIndex;
+static Bool workaroundsInitWindow( CompPlugin *plugin, 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;
+
+ return TRUE;
+}
+
+static void workaroundsFiniWindow( CompPlugin *p, CompWindow *w )
+{
+}
+
static Bool workaroundsInit( CompPlugin *plugin )
{
if ( !compInitPluginMetadataFromInfo( &workaroundsMetadata,
@@ -68,8 +89,8 @@ CompPluginVTable workaroundsVTable =
0, /* FiniDisplay */
0, /* InitScreen */
0, /* FiniScreen */
- 0, /* InitWindow */
- 0, /* FiniWindow */
+ workaroundsInitWindow,
+ workaroundsFiniWindow,
0, /* GetDisplayOptions */
0, /* SetDisplayOption */
0, /* GetScreenOptions */