Commit a0fd289a authored by Pavel Roskin's avatar Pavel Roskin Committed by Alexandre Julliard

Prevent X11 errors when XCreateWindow is called with zero width or

height.
parent ae8a748a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment