Alexandre Julliard wrote:
> 
> I'm not sure I see why we should require SYSMENU to manage a
> window. What is wrong with the current behavior?
> 

Ok.  I made my second patch without checking carefully
enough.  SYSMENU is not required.  

The problem with the current implementation is that no
minimize or maximize buttons appear on the managed window
frames of my main app.  This patch to windows/x11drv/wnd.c
(which I found in the corel wine tree, BTW) fixes that by
expanding the criteria for creating transient shells, but
has an ugly side-effect.


RCS file: /home/wine/wine/windows/x11drv/wnd.c,v
retrieving revision 1.43
diff -u -r1.43 wnd.c
--- windows/x11drv/wnd.c        2000/04/30 12:35:32     1.43
+++ windows/x11drv/wnd.c        2000/05/12 19:17:45
@@ -246,7 +348,9 @@
           }
       }
 
-      if (cs->hwndParent)  /* Get window owner */
+      /* Is it a "popup" for another window? */
+      if ((cs->hwndParent) && ((cs->style &
(WS_POPUP|WS_MINIMIZEBOX|WS_MAXIMIZEBOX)) == WS_POPUP)
+         && !(cs->dwExStyle & WS_EX_APPWINDOW))
       {
          Window w;
           WND *tmpWnd = WIN_FindWndPtr(cs->hwndParent);


Now the owner of the managed windows shows up on the system
tray as well.  This is a tiny (1x1) window that is hardly
visible.  The following patch to the WindowNeedsWMBorder
routine in windows/nonclient.c alleviates this side-effect.


Index: windows/nonclient.c
===================================================================
RCS file: /home/wine/wine/windows/nonclient.c,v
retrieving revision 1.50
diff -u -r1.50 nonclient.c
--- windows/nonclient.c 2000/05/14 23:43:29     1.50
+++ windows/nonclient.c 2000/05/15 17:41:54
@@ -101,7 +101,7 @@
     if (!(style & WS_CHILD) &&
        Options.managed  &&
        !(exStyle & WS_EX_TOOLWINDOW) &&
-        ( ((style & WS_CAPTION) == WS_CAPTION) ||
+        ( ((style & WS_CAPTION | WS_POPUP) == WS_CAPTION)
||
          (style & WS_THICKFRAME)))
         return TRUE;
     if (exStyle & WS_EX_TRAYWINDOW)

Reply via email to