winex11.drv: Change the priority of evaluated window styles to workaround a Metacity bug with handling of utility windows

Dmitry Timoshkov dmitry at codeweavers.com
Sun Apr 6 23:37:44 CDT 2008


Hello,

this patch fixes the bugs 11026 and 11111. The problem is that Metacity
doesn't set keyboard input focus to utility windows when mapping them.
I've filed a bug #525774 in the Gnome bugzilla, and have got a suggestion
to use dialog type for that kind of windows instead as a workaround.

Changelog:
    winex11.drv: Change the priority of evaluated window styles
    to workaround a Metacity bug with handling of utility windows.
---
 dlls/winex11.drv/window.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index e035041..ee04f04 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -955,10 +955,10 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
 
     /* set the WM_WINDOW_TYPE */
     window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL);
-    if (ex_style & WS_EX_TOOLWINDOW) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
-    else if (style & WS_THICKFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL);
+    if (style & WS_THICKFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL);
     else if (style & WS_DLGFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG);
     else if (ex_style & WS_EX_DLGMODALFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG);
+    else if (ex_style & WS_EX_TOOLWINDOW) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
 
     XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE),
 		    XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1);
-- 
1.5.4.5






More information about the wine-patches mailing list