Moved zero-sized window hack to x11drv.

This commit is contained in:
Lawson Whitney 2000-06-25 12:53:27 +00:00 committed by Alexandre Julliard
parent 12298c5cad
commit 68dd679043
2 changed files with 10 additions and 10 deletions

View File

@ -891,16 +891,8 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
if (cs->cy < minTrack.y ) cs->cy = minTrack.y; if (cs->cy < minTrack.y ) cs->cy = minTrack.y;
} }
if(cs->style & WS_CHILD)
{
if (cs->cx < 0) cs->cx = 0; if (cs->cx < 0) cs->cx = 0;
if (cs->cy < 0) cs->cy = 0; if (cs->cy < 0) cs->cy = 0;
}
else
{
if (cs->cx <= 0) cs->cx = 1;
if (cs->cy <= 0) cs->cy = 1;
}
wndPtr->rectWindow.left = cs->x; wndPtr->rectWindow.left = cs->x;
wndPtr->rectWindow.top = cs->y; wndPtr->rectWindow.top = cs->y;

View File

@ -301,6 +301,14 @@ BOOL X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BO
((X11DRV_WND_DATA *) wndPtr->pDriverData)->hWMIconBitmap = 0; ((X11DRV_WND_DATA *) wndPtr->pDriverData)->hWMIconBitmap = 0;
((X11DRV_WND_DATA *) wndPtr->pDriverData)->hWMIconMask = 0; ((X11DRV_WND_DATA *) wndPtr->pDriverData)->hWMIconMask = 0;
((X11DRV_WND_DATA *) wndPtr->pDriverData)->bit_gravity = win_attr.bit_gravity; ((X11DRV_WND_DATA *) wndPtr->pDriverData)->bit_gravity = win_attr.bit_gravity;
/* Zero-size X11 window hack. X doesn't like them, and will crash */
/* with a BadValue unless we do something ugly like this. */
/* FIXME: there must be a better way. */
if (cs->cx <= 0) cs->cx = 1;
if (cs->cy <= 0) cs->cy = 1;
/* EMXIF */
((X11DRV_WND_DATA *) wndPtr->pDriverData)->window = ((X11DRV_WND_DATA *) wndPtr->pDriverData)->window =
TSXCreateWindow( display, X11DRV_GetXRootWindow(), TSXCreateWindow( display, X11DRV_GetXRootWindow(),
cs->x, cs->y, cs->cx, cs->cy, cs->x, cs->y, cs->cx, cs->cy,