From a0fd289aef863db2cba771b8f2c853ef7ec3005a Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 14 Mar 1999 13:41:07 +0000 Subject: [PATCH] Prevent X11 errors when XCreateWindow is called with zero width or height. --- windows/x11drv/wnd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/windows/x11drv/wnd.c b/windows/x11drv/wnd.c index c30686edede..0c6e1af9eb3 100644 --- a/windows/x11drv/wnd.c +++ b/windows/x11drv/wnd.c @@ -296,7 +296,11 @@ WND *X11DRV_WND_SetParent(WND *wndPtr, WND *pWndParent) cs.hMenu = 0; /* not used in following call */ cs.hwndParent = pWndParent->hwndSelf; cs.cy = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top; + if (!cs.cy) + cs.cy = 1; cs.cx = wndPtr->rectWindow.right - wndPtr->rectWindow.left; + if (!cs.cx) + cs.cx = 1; cs.y = wndPtr->rectWindow.top; cs.x = wndPtr->rectWindow.left; cs.style = wndPtr->dwStyle; -- 2.11.4.GIT