This setting is a more extreme version of the ShowSystray setting: In addition to suppressing the floating systray, it suppresses systray icons in the host taskbar and in the virtual desktop taskbar. NoTrayItemsDisplay is the same registry setting that can be set on Windows to remove the system tray from the taskbar, so if any application sets it, Wine will now respect the setting.
From: Alex Henrie alexhenrie24@gmail.com
The functions always returned TRUE and nothing used the return value. --- programs/explorer/systray.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index b47c2239abd..4eafa41c2a5 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -129,8 +129,8 @@ static POINT balloon_pos; static LRESULT WINAPI shell_traywnd_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ); static LRESULT WINAPI tray_icon_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam );
-static BOOL show_icon( struct icon *icon ); -static BOOL hide_icon( struct icon *icon ); +static void show_icon( struct icon *icon ); +static void hide_icon( struct icon *icon ); static BOOL delete_icon( struct icon *icon );
static WNDCLASSEXW shell_traywnd_class = @@ -624,11 +624,11 @@ static void systray_remove_icon( struct icon *icon ) }
/* make an icon visible */ -static BOOL show_icon(struct icon *icon) +static void show_icon(struct icon *icon) { TRACE( "id=0x%x, hwnd=%p\n", icon->id, icon->owner );
- if (icon->display != ICON_DISPLAY_HIDDEN) return TRUE; /* already displayed */ + if (icon->display != ICON_DISPLAY_HIDDEN) return; /* already displayed */
if (enable_dock) { @@ -652,15 +652,14 @@ static BOOL show_icon(struct icon *icon)
update_tooltip_position( icon ); update_balloon( icon ); - return TRUE; }
/* make an icon invisible */ -static BOOL hide_icon(struct icon *icon) +static void hide_icon(struct icon *icon) { TRACE( "id=0x%x, hwnd=%p\n", icon->id, icon->owner );
- if (icon->display == ICON_DISPLAY_HIDDEN) return TRUE; /* already hidden */ + if (icon->display == ICON_DISPLAY_HIDDEN) return; /* already hidden */
if (enable_dock && NtUserMessageCall( icon->window, WINE_SYSTRAY_DOCK_REMOVE, 0, 0, NULL, NtUserSystemTrayCall, FALSE )) @@ -674,7 +673,6 @@ static BOOL hide_icon(struct icon *icon)
update_balloon( icon ); update_tooltip_position( icon ); - return TRUE; }
/* Modifies an existing icon record */
From: Alex Henrie alexhenrie24@gmail.com
This setting is a more extreme version of the ShowSystray setting: In addition to suppressing the floating systray, it suppresses systray icons in the host taskbar and in the virtual desktop taskbar. NoTrayItemsDisplay is the same registry setting that can be set on Windows to remove the system tray from the taskbar, so if any application sets it, Wine will now respect the setting. --- programs/explorer/desktop.c | 23 ++++++++++++++++++++--- programs/explorer/explorer_private.h | 2 +- programs/explorer/systray.c | 7 ++++++- 3 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 54f217a4ebc..40077f6b4a9 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -960,6 +960,22 @@ static BOOL get_default_show_systray( const WCHAR *name ) return result; }
+static BOOL get_no_tray_items_display(void) +{ + BOOL result; + DWORD size = sizeof(result); + + if (!RegGetValueW( HKEY_CURRENT_USER, L"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", + L"NoTrayItemsDisplay", RRF_RT_REG_DWORD, NULL, &result, &size )) + return result; + + if (!RegGetValueW( HKEY_LOCAL_MACHINE, L"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", + L"NoTrayItemsDisplay", RRF_RT_REG_DWORD, NULL, &result, &size )) + return result; + + return FALSE; +} + static void load_graphics_driver( const WCHAR *driver, GUID *guid ) { static const WCHAR device_keyW[] = L"System\CurrentControlSet\Control\Video\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\0000"; @@ -1144,7 +1160,7 @@ void manage_desktop( WCHAR *arg ) WCHAR *cmdline = NULL, *driver = NULL; WCHAR *p = arg; const WCHAR *name = NULL; - BOOL enable_shell = FALSE, show_systray = TRUE; + BOOL enable_shell, show_systray, no_tray_items; void (WINAPI *pShellDDEInit)( BOOL ) = NULL; HMODULE shell32; HANDLE thread; @@ -1178,8 +1194,9 @@ void manage_desktop( WCHAR *arg ) if (!get_default_desktop_size( name, &width, &height )) width = height = 0; }
- if (name) enable_shell = get_default_enable_shell( name ); + enable_shell = name ? get_default_enable_shell( name ) : FALSE; show_systray = get_default_show_systray( name ); + no_tray_items = get_no_tray_items_display();
UuidCreate( &guid ); TRACE( "display guid %s\n", debugstr_guid(&guid) ); @@ -1223,7 +1240,7 @@ void manage_desktop( WCHAR *arg ) initialize_display_settings( width, height ); initialize_appbar();
- initialize_systray( using_root, enable_shell, show_systray ); + initialize_systray( using_root, enable_shell, show_systray, no_tray_items ); if (!using_root) initialize_launchers( hwnd );
if ((shell32 = LoadLibraryW( L"shell32.dll" )) && diff --git a/programs/explorer/explorer_private.h b/programs/explorer/explorer_private.h index 0639e41c9c6..10e8aa0653f 100644 --- a/programs/explorer/explorer_private.h +++ b/programs/explorer/explorer_private.h @@ -22,7 +22,7 @@ #define __WINE_EXPLORER_PRIVATE_H
extern void manage_desktop( WCHAR *arg ); -extern void initialize_systray( BOOL using_root, BOOL enable_shell, BOOL show_systray ); +extern void initialize_systray( BOOL using_root, BOOL enable_shell, BOOL show_systray, BOOL no_tray_items ); extern void initialize_appbar(void); extern void handle_parent_notify( HWND hwnd, WPARAM wp ); extern void do_startmenu( HWND owner ); diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 4eafa41c2a5..b5fbb32a486 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -105,6 +105,7 @@ static unsigned int nb_displayed; static BOOL enable_taskbar; /* show full taskbar, with dedicated systray area */ static BOOL show_systray; /* show a standalone systray window */ static BOOL enable_dock; /* allow systray icons to be docked in the host systray */ +static BOOL no_tray_items; /* hide the systray and all systray icons */
static int icon_cx, icon_cy, tray_width, tray_height; static int start_button_width, taskbar_button_width; @@ -628,6 +629,8 @@ static void show_icon(struct icon *icon) { TRACE( "id=0x%x, hwnd=%p\n", icon->id, icon->owner );
+ if (no_tray_items) return; + if (icon->display != ICON_DISPLAY_HIDDEN) return; /* already displayed */
if (enable_dock) @@ -1156,7 +1159,7 @@ void handle_parent_notify( HWND hwnd, WPARAM wp ) }
/* this function creates the listener window */ -void initialize_systray( BOOL arg_using_root, BOOL arg_enable_shell, BOOL arg_show_systray ) +void initialize_systray( BOOL arg_using_root, BOOL arg_enable_shell, BOOL arg_show_systray, BOOL arg_no_tray_items ) { RECT work_rect, primary_rect, taskbar_rect;
@@ -1181,6 +1184,8 @@ void initialize_systray( BOOL arg_using_root, BOOL arg_enable_shell, BOOL arg_sh enable_dock = FALSE; }
+ no_tray_items = arg_no_tray_items; + /* register the systray listener window class */ if (!RegisterClassExW( &shell_traywnd_class )) {
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148140
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 00000000024600D6, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032 input.c:733: Test failed: peek: raw_legacy: 0: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x1, flags 0, vkey F, message WM_KEYDOWN, extra 0 input.c:733: Test failed: peek: raw_legacy: 0: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYDOWN, wparam 0x46, lparam 0x10001 input.c:733: Test failed: peek: raw_legacy: 0: test->expect 2 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_CHAR, wparam 0x66, lparam 0x10001 input.c:734: Test failed: peek: raw_legacy: 0: got F: 0 input.c:733: Test failed: peek: raw_legacy: 1: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x2, flags 0x1, vkey F, message WM_KEYUP, extra 0 input.c:733: Test failed: peek: raw_legacy: 1: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYUP, wparam 0x46, lparam 0xffffffffc0020001 input.c:733: Test failed: peek: raw_vk_packet_legacy: 0: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x1, flags 0, vkey 0xe7, message WM_KEYDOWN, extra 0 input.c:733: Test failed: peek: raw_vk_packet_legacy: 0: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYDOWN, wparam 0xe7, lparam 0x10001 input.c:734: Test failed: peek: raw_vk_packet_legacy: 0: got 0xe7: 0 input.c:733: Test failed: peek: raw_vk_packet_legacy: 1: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x2, flags 0x1, vkey 0xe7, message WM_KEYUP, extra 0 input.c:733: Test failed: peek: raw_vk_packet_legacy: 1: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYUP, wparam 0xe7, lparam 0xffffffffc0020001 input.c:733: Test failed: peek: raw_unicode_legacy: 0: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_CHAR, wparam 0x3c0, lparam 0x1 input.c:734: Test failed: peek: raw_unicode_legacy: 0: got 0xe7: 0 input.c:733: Test failed: peek: raw_unicode_vkey_ctrl_legacy: 0: test->expect 0 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYDOWN, wparam 0x11, lparam 0xc00001 input.c:734: Test failed: peek: raw_unicode_vkey_ctrl_legacy: 0: got VK_CONTROL: 0 input.c:734: Test failed: peek: raw_unicode_vkey_ctrl_legacy: 0: got VK_LCONTROL: 0 input.c:733: Test failed: peek: raw_unicode_vkey_ctrl_legacy: 1: test->expect 0 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYUP, wparam 0x11, lparam 0xffffffffc0c00001 input.c:733: Test failed: peek: raw_nolegacy: 0: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x1, flags 0, vkey F, message WM_KEYDOWN, extra 0 input.c:733: Test failed: peek: raw_nolegacy: 1: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x2, flags 0x1, vkey F, message WM_KEYUP, extra 0 input.c:733: Test failed: peek: raw_vk_packet_nolegacy: 0: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x1, flags 0, vkey 0xe7, message WM_KEYDOWN, extra 0 input.c:733: Test failed: peek: raw_vk_packet_nolegacy: 1: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x2, flags 0x1, vkey 0xe7, message WM_KEYUP, extra 0 input.c:733: Test failed: receive: raw_legacy: 0: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x1, flags 0, vkey F, message WM_KEYDOWN, extra 0 input.c:733: Test failed: receive: raw_legacy: 0: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYDOWN, wparam 0x46, lparam 0x10001 input.c:733: Test failed: receive: raw_legacy: 0: test->expect 2 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_CHAR, wparam 0x66, lparam 0x10001 input.c:734: Test failed: receive: raw_legacy: 0: got F: 0 input.c:733: Test failed: receive: raw_legacy: 1: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x2, flags 0x1, vkey F, message WM_KEYUP, extra 0 input.c:733: Test failed: receive: raw_legacy: 1: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYUP, wparam 0x46, lparam 0xffffffffc0020001 input.c:733: Test failed: receive: raw_vk_packet_legacy: 0: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x1, flags 0, vkey 0xe7, message WM_KEYDOWN, extra 0 input.c:733: Test failed: receive: raw_vk_packet_legacy: 0: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYDOWN, wparam 0xe7, lparam 0x10001 input.c:734: Test failed: receive: raw_vk_packet_legacy: 0: got 0xe7: 0 input.c:733: Test failed: receive: raw_vk_packet_legacy: 1: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x2, flags 0x1, vkey 0xe7, message WM_KEYUP, extra 0 input.c:733: Test failed: receive: raw_vk_packet_legacy: 1: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYUP, wparam 0xe7, lparam 0xffffffffc0020001 input.c:733: Test failed: receive: raw_unicode_legacy: 0: test->expect 1 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_CHAR, wparam 0x3c0, lparam 0x1 input.c:734: Test failed: receive: raw_unicode_legacy: 0: got 0xe7: 0 input.c:733: Test failed: receive: raw_unicode_vkey_ctrl_legacy: 0: test->expect 0 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYDOWN, wparam 0x11, lparam 0xc00001 input.c:734: Test failed: receive: raw_unicode_vkey_ctrl_legacy: 0: got VK_CONTROL: 0 input.c:734: Test failed: receive: raw_unicode_vkey_ctrl_legacy: 0: got VK_LCONTROL: 0 input.c:733: Test failed: receive: raw_unicode_vkey_ctrl_legacy: 1: test->expect 0 (missing): MSG_TEST_WIN hwnd 0000000000000000, WM_KEYUP, wparam 0x11, lparam 0xffffffffc0c00001 input.c:733: Test failed: receive: raw_nolegacy: 0: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x1, flags 0, vkey F, message WM_KEYDOWN, extra 0 input.c:733: Test failed: receive: raw_nolegacy: 1: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x2, flags 0x1, vkey F, message WM_KEYUP, extra 0 input.c:733: Test failed: receive: raw_vk_packet_nolegacy: 0: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x1, flags 0, vkey 0xe7, message WM_KEYDOWN, extra 0 input.c:733: Test failed: receive: raw_vk_packet_nolegacy: 1: test->expect 0 (missing): got WM_INPUT key hwnd 0000000000000000, code 0, make_code 0x2, flags 0x1, vkey 0xe7, message WM_KEYUP, extra 0
This merge request was approved by Rémi Bernon.