Dmitry Timoshkov : winex11: Add a workaround for Metacity being too strict and disabling fullscreen support for not resizable windows .
Alexandre Julliard
julliard at winehq.org
Thu Feb 28 06:21:58 CST 2008
Module: wine
Branch: master
Commit: cfcacdf554b90da7e28583d4f05c2de533242de7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cfcacdf554b90da7e28583d4f05c2de533242de7
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Thu Feb 28 20:04:49 2008 +0800
winex11: Add a workaround for Metacity being too strict and disabling fullscreen support for not resizable windows.
---
dlls/winex11.drv/window.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 71edc60..59602fc 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -799,11 +799,18 @@ static void set_size_hints( Display *display, struct x11drv_win_data *data, DWOR
if ( !(style & WS_THICKFRAME) )
{
- size_hints->max_width = data->whole_rect.right - data->whole_rect.left;
- size_hints->max_height = data->whole_rect.bottom - data->whole_rect.top;
- size_hints->min_width = size_hints->max_width;
- size_hints->min_height = size_hints->max_height;
- size_hints->flags |= PMinSize | PMaxSize;
+ /* If we restrict window resizing Metacity decides that it should
+ * disable fullscreen support for this window as well.
+ */
+ if (!(data->whole_rect.left <= 0 && data->whole_rect.right >= screen_width &&
+ data->whole_rect.top <= 0 && data->whole_rect.bottom >= screen_height))
+ {
+ size_hints->max_width = data->whole_rect.right - data->whole_rect.left;
+ size_hints->max_height = data->whole_rect.bottom - data->whole_rect.top;
+ size_hints->min_width = size_hints->max_width;
+ size_hints->min_height = size_hints->max_height;
+ size_hints->flags |= PMinSize | PMaxSize;
+ }
}
XSetWMNormalHints( display, data->whole_window, size_hints );
XFree( size_hints );
More information about the wine-cvs
mailing list