
Index: windows/x11drv/wnd.c
===================================================================
RCS file: /home/wine/wine/windows/x11drv/wnd.c,v
retrieving revision 1.58
diff -u -r1.58 wnd.c
--- windows/x11drv/wnd.c	2000/08/19 21:38:56	1.58
+++ windows/x11drv/wnd.c	2000/08/30 20:58:28
@@ -622,23 +622,21 @@
     WND *winposPtr = WIN_FindWndPtr( winpos->hwnd );
     if ( !winposPtr ) return;
 
-    /* find out if after this function we will end out with a zero-size window */
     if (X11DRV_WND_IsZeroSizeWnd(winposPtr))
+        isZeroSizeWnd = TRUE;
+    else if ( !(winpos->flags & SWP_NOSIZE) && 
+               (winposPtr->dwStyle & WS_VISIBLE) &&
+              !(winpos->flags & SWP_HIDEWINDOW) &&
+              !(winpos->flags & SWP_SHOWWINDOW) )
     {
-        /* if current size is 0, and no resizing */
-        if (winpos->flags & SWP_NOSIZE)
-            isZeroSizeWnd = TRUE;
-        else if ((winpos->cx > 0) && (winpos->cy > 0)) 
-        {
-            /* if this function is setting a new size > 0 for the window, we
-               should map the window if WS_VISIBLE is set */
-            if ((winposPtr->dwStyle & WS_VISIBLE) && !(winpos->flags & SWP_HIDEWINDOW))
-                forceMapWindow = TRUE;
-        }
+        /* check if the window is map 
+           if not it means, it was a zero-sized window and
+           it needs to be forced to be mapped */
+        XWindowAttributes winAttr;
+        TSXGetWindowAttributes(display, X11DRV_WND_GetXWindow(wndPtr), &winAttr); 
+        if (winAttr.map_state == IsUnmapped)
+            forceMapWindow = TRUE;
     }
-    /* if resizing to 0 */
-    if ( !(winpos->flags & SWP_NOSIZE) && ((winpos->cx <= 0) || (winpos->cy <= 0)) )
-            isZeroSizeWnd = TRUE;
 
     if(!wndPtr->hwndSelf) wndPtr = NULL; /* FIXME: WND destroyed, shouldn't happen!!! */
   
