Alexandre Julliard : winex11.drv: Set the initial icon hints in set_initial_wm_hints().

Alexandre Julliard julliard at winehq.org
Mon Jan 21 05:58:52 CST 2008


Module: wine
Branch: master
Commit: 6a23bd885d2832621e00401e38f2e53e82d812d6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6a23bd885d2832621e00401e38f2e53e82d812d6

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jan 18 14:34:57 2008 +0100

winex11.drv: Set the initial icon hints in set_initial_wm_hints().

---

 dlls/winex11.drv/window.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index e39a5ce..109b142 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -774,6 +774,12 @@ static void set_initial_wm_hints( Display *display, struct x11drv_win_data *data
                      XA_ATOM, 32, PropModeReplace, (unsigned char*)&dndVersion, 1 );
 
     wine_tsx11_unlock();
+
+    if (data->wm_hints)
+    {
+        data->wm_hints->flags = 0;
+        set_icon_hints( display, data, (HICON)GetClassLongPtrW( data->hwnd, GCLP_HICON ) );
+    }
 }
 
 
@@ -837,21 +843,17 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
                      x11drv_atom(_MOTIF_WM_HINTS), 32, PropModeReplace,
                      (unsigned char*)&mwm_hints, sizeof(mwm_hints)/sizeof(long) );
 
-    wine_tsx11_unlock();
-
     /* wm hints */
     if (data->wm_hints)
     {
-        data->wm_hints->flags = InputHint | StateHint | WindowGroupHint;
+        data->wm_hints->flags |= InputHint | StateHint | WindowGroupHint;
         data->wm_hints->input = !(style & WS_DISABLED);
         data->wm_hints->initial_state = (style & WS_MINIMIZE) ? IconicState : NormalState;
         data->wm_hints->window_group = group_leader;
-        set_icon_hints( display, data, (HICON)GetClassLongPtrW( data->hwnd, GCLP_HICON ) );
-
-        wine_tsx11_lock();
         XSetWMHints( display, data->whole_window, data->wm_hints );
-        wine_tsx11_unlock();
     }
+
+    wine_tsx11_unlock();
 }
 
 




More information about the wine-cvs mailing list