systray icon questions

Kirill K. Smirnov lich at
Thu Dec 28 04:14:13 CST 2006

Hi, all!
I was playing around systray icons in various modes
"allow the window manager to control the windows"="on"
"emulate a virtual desktop"="off"

As result, systray icon is OK.

2) In other combination of these parameters, the icon is drawn with window 

I've tried to investigate the problem and created the patch (attached).
But it solves the problem only in non-desktop modes.
In desktop modes only window title is drawn.

So the questions:
1) Does systray icon helper window really need to be created with WS_CAPTION 
2) What does "managed" mode mean?
3) When I select "desktop" mode, should we disable the "managed" checkbox?

Thanks in advance,

-- Kirill K. Smirnov
-------------- next part --------------
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 1430563..f7c34b0 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;
diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c
index 7fc66fd..17662da 100644
--- a/programs/explorer/systray.c
+++ b/programs/explorer/systray.c
@@ -242,12 +242,12 @@ static void add_icon(NOTIFYICONDATAW *ni = 0;
     rect.right = GetSystemMetrics(SM_CXSMICON) + ICON_BORDER;
     rect.bottom = GetSystemMetrics(SM_CYSMICON) + ICON_BORDER;
-    AdjustWindowRect(&rect, WS_CLIPSIBLINGS | WS_CAPTION, FALSE);
+    AdjustWindowRect(&rect, WS_CLIPSIBLINGS, FALSE);
     /* create the adaptor window */
     icon->window = CreateWindowEx(WS_EX_TRAYWINDOW, adaptor_classname,
-                                  WS_CLIPSIBLINGS | WS_CAPTION,
+                                  WS_CLIPSIBLINGS,
                                   CW_USEDEFAULT, CW_USEDEFAULT,
                                   rect.right - rect.left,
                                   rect.bottom -,

More information about the wine-devel mailing list