Prevent X11 errors when XCreateWindow is called with zero width or
height.
This commit is contained in:
parent
ae8a748aa1
commit
a0fd289aef
|
@ -296,7 +296,11 @@ WND *X11DRV_WND_SetParent(WND *wndPtr, WND *pWndParent)
|
||||||
cs.hMenu = 0; /* not used in following call */
|
cs.hMenu = 0; /* not used in following call */
|
||||||
cs.hwndParent = pWndParent->hwndSelf;
|
cs.hwndParent = pWndParent->hwndSelf;
|
||||||
cs.cy = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
|
cs.cy = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
|
||||||
|
if (!cs.cy)
|
||||||
|
cs.cy = 1;
|
||||||
cs.cx = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
|
cs.cx = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
|
||||||
|
if (!cs.cx)
|
||||||
|
cs.cx = 1;
|
||||||
cs.y = wndPtr->rectWindow.top;
|
cs.y = wndPtr->rectWindow.top;
|
||||||
cs.x = wndPtr->rectWindow.left;
|
cs.x = wndPtr->rectWindow.left;
|
||||||
cs.style = wndPtr->dwStyle;
|
cs.style = wndPtr->dwStyle;
|
||||||
|
|
Loading…
Reference in New Issue