[systray 3] winex11.drv: clear systray window area when icon is changed

Kirill K. Smirnov lich at math.spbu.ru
Tue Jan 2 15:45:29 CST 2007


-------------- next part --------------
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 1430563..a5a3afa 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -71,10 +71,10 @@ inline static BOOL is_window_managed( HW
 {
     DWORD style, ex_style;
 
-    if (!managed_mode) return FALSE;
     /* tray window is always managed */
     ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE );
     if (ex_style & WS_EX_TRAYWINDOW) return TRUE;
+    if (!managed_mode) return FALSE;
     /* child windows are not managed */
     style = GetWindowLongW( hwnd, GWL_STYLE );
     if (style & WS_CHILD) return FALSE;
@@ -366,6 +366,7 @@ static void systray_dock_window( Display
         
         wine_tsx11_lock();
         XSendEvent( display, systray_window, False, NoEventMask, &ev );
+        XSetWindowBackgroundPixmap(display, data->whole_window, ParentRelative);
         wine_tsx11_unlock();
 
     }
@@ -1324,6 +1325,7 @@ void X11DRV_SetWindowIcon( HWND hwnd, UI
     Display *display = thread_display();
     struct x11drv_win_data *data;
     XWMHints* wm_hints;
+    DWORD ex_style;
 
     if (type != ICON_BIG) return;  /* nothing to do here */
 
@@ -1331,6 +1333,14 @@ void X11DRV_SetWindowIcon( HWND hwnd, UI
     if (!data->whole_window) return;
     if (!data->managed) return;
 
+    ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE );
+    if (ex_style & WS_EX_TRAYWINDOW)
+    {
+        WINE_FIXME("clearing systray bkg - brute force\n");
+        XClearWindow(display, data->whole_window);
+        XFlush(display);
+        return;
+    }
     wine_tsx11_lock();
     if (!(wm_hints = XGetWMHints( display, data->whole_window ))) wm_hints = XAllocWMHints();
     wine_tsx11_unlock();


More information about the wine-patches mailing list