Alexandre Julliard : winex11: Don' t allow changing the X11 size of a maximized window.

Alexandre Julliard julliard at winehq.org
Thu Apr 24 06:23:06 CDT 2008


Module: wine
Branch: master
Commit: bbd32aacff1555df0153deee22ca40de992de007
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bbd32aacff1555df0153deee22ca40de992de007

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Apr 23 15:34:07 2008 +0200

winex11: Don't allow changing the X11 size of a maximized window.

---

 dlls/winex11.drv/window.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 5dc5ffc..89b7150 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1157,12 +1157,17 @@ static void sync_window_position( Display *display, struct x11drv_win_data *data
 {
     DWORD style = GetWindowLongW( data->hwnd, GWL_STYLE );
     XWindowChanges changes;
-    int mask = CWWidth | CWHeight;
+    unsigned int mask = 0;
 
     if (data->managed && data->iconic) return;
 
-    if ((changes.width = data->whole_rect.right - data->whole_rect.left) <= 0) changes.width = 1;
-    if ((changes.height = data->whole_rect.bottom - data->whole_rect.top) <= 0) changes.height = 1;
+    /* resizing a managed maximized window is not allowed */
+    if (!(style & WS_MAXIMIZE) || !data->managed)
+    {
+        if ((changes.width = data->whole_rect.right - data->whole_rect.left) <= 0) changes.width = 1;
+        if ((changes.height = data->whole_rect.bottom - data->whole_rect.top) <= 0) changes.height = 1;
+        mask |= CWWidth | CWHeight;
+    }
 
     /* only the size is allowed to change for the desktop window */
     if (data->whole_window != root_window)




More information about the wine-cvs mailing list