mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
Moved zero-sized window hack to x11drv.
This commit is contained in:
parent
12298c5cad
commit
68dd679043
2 changed files with 10 additions and 10 deletions
|
@ -891,16 +891,8 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
|
|||
if (cs->cy < minTrack.y ) cs->cy = minTrack.y;
|
||||
}
|
||||
|
||||
if(cs->style & WS_CHILD)
|
||||
{
|
||||
if(cs->cx < 0) cs->cx = 0;
|
||||
if(cs->cy < 0) cs->cy = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cs->cx <= 0) cs->cx = 1;
|
||||
if (cs->cy <= 0) cs->cy = 1;
|
||||
}
|
||||
if (cs->cx < 0) cs->cx = 0;
|
||||
if (cs->cy < 0) cs->cy = 0;
|
||||
|
||||
wndPtr->rectWindow.left = cs->x;
|
||||
wndPtr->rectWindow.top = cs->y;
|
||||
|
|
|
@ -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)->hWMIconMask = 0;
|
||||
((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 =
|
||||
TSXCreateWindow( display, X11DRV_GetXRootWindow(),
|
||||
cs->x, cs->y, cs->cx, cs->cy,
|
||||
|
|
Loading…
Reference in a new issue