--- winehq/dlls/x11drv/window.c Sat Mar 9 18:44:35 2002 +++ wine/dlls/x11drv/window.c Wed May 1 16:52:00 2002 @@ -696,6 +696,9 @@ mask |= CWBitGravity | CWWinGravity | CWBackingStore; data->whole_rect = rect; + + TRACE("XCreateWindow %p, %p, %d, %d, %d, %d, %d, %d\n", display, parent, rect.left, rect.top, cx, cy, screen_depth, attr); + data->whole_window = XCreateWindow( display, parent, rect.left, rect.top, cx, cy, 0, screen_depth, InputOutput, visual, mask, &attr ); @@ -744,6 +747,17 @@ attr.backing_store = NotUseful/*WhenMapped*/; wine_tsx11_lock(); + + TRACE("XCreateWindow %p, %p, %d, %d, %d, %d, %d, %d\n", + display, + data->whole_window, + 0, + 0, + max( rect.right - rect.left, 1 ), + max( rect.bottom - rect.top, 1 ), + screen_depth, + attr); + data->client_window = XCreateWindow( display, data->whole_window, 0, 0, max( rect.right - rect.left, 1 ), max( rect.bottom - rect.top, 1 ), @@ -871,6 +885,15 @@ RECT rect; BOOL ret = FALSE; + TRACE("in\n"); + + /*mbc - sanity checking sizes, if they are too large, the X server stops and wine crashes*/ + + if(cs->cx > 1000000) + cs->cx = 1000000; + if(cs->cy > 1000000) + cs->cy = 1000000; + if (!(data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)))) return FALSE; data->whole_window = 0; data->client_window = 0;