James Liggett : winex11.drv: Fix explorer regression caused by systray patch

Alexandre Julliard julliard at wine.codeweavers.com
Thu Aug 24 05:56:45 CDT 2006


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

Author: James Liggett <jrliggett at cox.net>
Date:   Wed Aug 23 13:35:02 2006 -0700

winex11.drv: Fix explorer regression caused by systray patch

Move systray_dock_window call to X11DRV_CreateWindow so that it can
safely call SetWindowPos without having _CheckNotSysLevel crash the
explorer.

---

 dlls/winex11.drv/window.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 30ef89b..f540442 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -515,10 +515,6 @@ void X11DRV_set_wm_hints( Display *displ
 
     /* size hints */
     set_size_hints( display, data, style );
-    
-    /* Dock system tray windows. */
-    if (ex_style & WS_EX_TRAYWINDOW)
-        systray_dock_window( display, data );
 
     /* set the WM_CLIENT_MACHINE and WM_LOCALE_NAME properties */
     XSetWMProperties(display, data->whole_window, NULL, NULL, NULL, 0, NULL, NULL, NULL);
@@ -1168,6 +1164,12 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CRE
                       newPos.right, newPos.bottom, swFlag );
     }
 
+    /* Dock system tray windows. */
+    /* Dock after the window is created so we don't have problems calling
+     * SetWindowPos. */
+    if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_TRAYWINDOW)
+        systray_dock_window( display, data );
+
     return TRUE;
 
  failed:




More information about the wine-cvs mailing list