From 308476ef2f74d33126ecc51e0ea8d313b276b6a5 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 17 Sep 2008 21:11:47 +0200 Subject: [PATCH] winex11: Force the X11 size of zero-sized window to always be 1x1. --- dlls/winex11.drv/window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index bd370f68827..fb64299a0b2 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; } -- 2.11.4.GIT