[try 3][systray 3]: user32: Do not call SetWindowPos in case of systray adaptor window

Kirill K. Smirnov lich at math.spbu.ru
Thu Jan 4 01:48:28 CST 2007


-------------- next part --------------
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index 9278ddd..c814db5 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -657,6 +657,7 @@ static LRESULT DEFWND_DefWinProc( HWND h
         {
             HICON ret;
             WND *wndPtr = WIN_GetPtr( hwnd );
+            DWORD ex_style;
 
             switch(wParam)
             {
@@ -676,8 +677,10 @@ static LRESULT DEFWND_DefWinProc( HWND h
 
             USER_Driver->pSetWindowIcon( hwnd, wParam, (HICON)lParam );
 
-            SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE |
-                         SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
+            ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE );
+            if (!(ex_style & WS_EX_TRAYWINDOW))
+                SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE |
+                             SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
 
             return (LRESULT)ret;
         }


More information about the wine-patches mailing list