Alexandre Julliard : explorer: Don' t bother with taskbar buttons when the taskbar is not visible.

Alexandre Julliard julliard at winehq.org
Fri Jun 10 09:05:46 CDT 2016


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jun 10 17:39:54 2016 +0900

explorer: Don't bother with taskbar buttons when the taskbar is not visible.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/explorer/systray.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c
index 94ba74b..623743f 100644
--- a/programs/explorer/systray.c
+++ b/programs/explorer/systray.c
@@ -483,6 +483,8 @@ static void sync_taskbar_buttons(void)
     int right = tray_width - nb_displayed * icon_cx;
     HWND foreground = GetAncestor( GetForegroundWindow(), GA_ROOTOWNER );
 
+    if (!IsWindowVisible( tray_window )) return;
+
     LIST_FOR_EACH_ENTRY( win, &taskbar_buttons, struct taskbar_button, entry )
     {
         if (!win->hwnd)  /* start button */
@@ -597,6 +599,8 @@ static void add_taskbar_button( HWND hwnd )
 {
     struct taskbar_button *win;
 
+    if (hide_systray) return;
+
     /* ignore our own windows */
     if (hwnd)
     {
@@ -730,9 +734,9 @@ static void do_show_systray(void)
     tray_width = GetSystemMetrics( SM_CXSCREEN );
     tray_height = max( icon_cy, size.cy );
     start_button_width = size.cx;
-    sync_taskbar_buttons();
     SetWindowPos( tray_window, HWND_TOPMOST, 0, GetSystemMetrics( SM_CYSCREEN ) - tray_height,
                   tray_width, tray_height, SWP_NOACTIVATE | SWP_SHOWWINDOW );
+    sync_taskbar_buttons();
 }
 
 static LRESULT WINAPI tray_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)




More information about the wine-cvs mailing list