x11drv: Allow WM to manage more windows. [Try 2]

Vitaliy Margolen wine-patch at kievinfo.com
Sat Jan 14 13:19:55 CST 2006


This time without menu class - it's covered under popup without sysmenu.

Basically this changes default to "managed" including toolwindow. That
should be handled by WM and all WMs that I've tested handle this
properly. The only side-affect is that those windows show up in the
taskbar. But this is better then having it completely unmanaged.

Also WM_CAPTION doesn't necessarily means window title. For example lots of
tool-tips are STATIC class windows with that flag set.

This patch has been tested on several programs (Steam, Delphi5, ACDSee) in
several window managers (KDE, Gnome, Xfce4, iceWM). So far the only problem is
windows that being created as managed, and then changed style after creation to
qualify as unmanaged (Steam's tool-tips). This is completely different problem
however.

ChangeLog:
x11drv: Allow WM to manage more windows.
-------------- next part --------------
diff --git a/dlls/x11drv/window.c b/dlls/x11drv/window.c
index 8eca46e..754bd0e 100644
--- a/dlls/x11drv/window.c
+++ b/dlls/x11drv/window.c
@@ -75,14 +75,6 @@ inline static BOOL is_window_managed( HW
     /* child windows are not managed */
     style = GetWindowLongW( hwnd, GWL_STYLE );
     if (style & WS_CHILD) return FALSE;
-    /* windows with caption are managed */
-    if ((style & WS_CAPTION) == WS_CAPTION) return TRUE;
-    /* tool windows are not managed  */
-    if (ex_style & WS_EX_TOOLWINDOW) return FALSE;
-    /* windows with thick frame are managed */
-    if (style & WS_THICKFRAME) return TRUE;
-    /* application windows are managed */
-    if (ex_style & WS_EX_APPWINDOW) return TRUE;
     /* full-screen popup windows are managed */
     if (style & WS_POPUP)
     {
@@ -91,8 +83,11 @@ inline static BOOL is_window_managed( HW
         if ((rect.right - rect.left) == screen_width && (rect.bottom - rect.top) == screen_height)
             return TRUE;
     }
-    /* default: not managed */
-    return FALSE;
+    /* popups without sysmenu are not managed */
+    if (style & WS_POPUP && !(style & WS_SYSMENU)) return FALSE;
+
+    /* default: managed */
+    return TRUE;
 }
 
 


More information about the wine-patches mailing list