winex11.drv: Add a workaround for Metacity being too strict and disabling fullscreen support for not resizable windows

Dmitry Timoshkov dmitry at codeweavers.com
Thu Feb 28 06:04:49 CST 2008


Hello,

if we restrict window resizing Metacity decides that it should
disable fullscreen support for this window as well.

This patch makes fullscreen support work again in Gnome, IceWM and FvWM,
and most likely will fix lots of the bugs with fullscreen problems reported
in bugzilla.

Changelog:
    winex11.drv: 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 cf84389..49f8029 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 );
-- 
1.5.4.1






More information about the wine-patches mailing list