1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

explorer: Don't pop start menu on "minimize all windows" systray command.

This commit is contained in:
Paul Gofman 2024-01-08 21:05:35 -06:00 committed by Alexandre Julliard
parent 988253a69b
commit d66fe6206d
2 changed files with 39 additions and 2 deletions

View file

@ -1796,7 +1796,7 @@ static void test_shell_window(void)
WaitForSingleObject(hthread, INFINITE);
DeleteObject(hthread);
CloseHandle(hthread);
CloseDesktop(hdesk);
}
@ -13033,6 +13033,32 @@ static void test_WM_NCCALCSIZE(void)
DestroyWindow(hwnd);
}
#define TRAY_MINIMIZE_ALL 419
static void test_shell_tray(void)
{
HWND hwnd, traywnd;
if (!(traywnd = FindWindowA( "Shell_TrayWnd", NULL )))
{
skip( "Shell_TrayWnd not found, skipping tests.\n" );
return;
}
hwnd = CreateWindowW( L"static", L"parent", WS_OVERLAPPEDWINDOW|WS_VISIBLE,
100, 100, 200, 200, 0, 0, 0, NULL );
ok( !!hwnd, "failed, error %lu.\n", GetLastError() );
flush_events( TRUE );
ok( !IsIconic( hwnd ), "window is minimized.\n" );
SendMessageA( traywnd, WM_COMMAND, TRAY_MINIMIZE_ALL, 0xdeadbeef );
flush_events( TRUE );
todo_wine ok( IsIconic( hwnd ), "window is not minimized.\n" );
DestroyWindow(hwnd);
}
START_TEST(win)
{
char **argv;
@ -13229,4 +13255,5 @@ START_TEST(win)
test_topmost();
test_shell_window();
test_shell_tray();
}

View file

@ -33,6 +33,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(systray);
#define TRAY_MINIMIZE_ALL 419
struct notify_data /* platform-independent format for NOTIFYICONDATA */
{
LONG hWnd;
@ -1060,7 +1062,15 @@ static LRESULT WINAPI shell_traywnd_proc( HWND hwnd, UINT msg, WPARAM wparam, LP
break;
case WM_COMMAND:
if (HIWORD(wparam) == BN_CLICKED) click_taskbar_button( (HWND)lparam );
if (HIWORD(wparam) == BN_CLICKED)
{
if (LOWORD(wparam) == TRAY_MINIMIZE_ALL)
{
FIXME( "Shell command %u is not supported.\n", LOWORD(wparam) );
break;
}
click_taskbar_button( (HWND)lparam );
}
break;
case WM_CONTEXTMENU: