Alexandre Julliard : winex11: Force the X11 size of zero-sized window to always be 1x1.

Alexandre Julliard julliard at winehq.org
Thu Sep 18 07:55:43 CDT 2008


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Sep 17 21:11:47 2008 +0200

winex11: Force the X11 size of zero-sized window to always be 1x1.

---

 dlls/winex11.drv/window.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index bd370f6..fb64299 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1216,8 +1216,10 @@ static void sync_window_position( Display *display, struct x11drv_win_data *data
     /* 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;
+        changes.width = data->whole_rect.right - data->whole_rect.left;
+        changes.height = data->whole_rect.bottom - data->whole_rect.top;
+        /* if window rect is empty force size to 1x1 */
+        if (changes.width <= 0 || changes.height <= 0) changes.width = changes.height = 1;
         mask |= CWWidth | CWHeight;
     }
 




More information about the wine-cvs mailing list