From 75367a75f2d88b9aa7756ebf2ecc6151e018dfc8 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Sun, 11 Feb 2024 07:48:11 +1100 Subject: [PATCH] Added explorer-reverts patchset --- ...Set-layered-style-on-systray-icons-o.patch | 43 ++++++++++++++++++ ...Don-t-activate-the-systray-icon-when.patch | 45 +++++++++++++++++++ patches/explorer-reverts/definition | 4 ++ 3 files changed, 92 insertions(+) create mode 100644 patches/explorer-reverts/0001-Revert-explorer-Set-layered-style-on-systray-icons-o.patch create mode 100644 patches/explorer-reverts/0002-Revert-explorer-Don-t-activate-the-systray-icon-when.patch create mode 100644 patches/explorer-reverts/definition diff --git a/patches/explorer-reverts/0001-Revert-explorer-Set-layered-style-on-systray-icons-o.patch b/patches/explorer-reverts/0001-Revert-explorer-Set-layered-style-on-systray-icons-o.patch new file mode 100644 index 00000000..ebae2935 --- /dev/null +++ b/patches/explorer-reverts/0001-Revert-explorer-Set-layered-style-on-systray-icons-o.patch @@ -0,0 +1,43 @@ +From 3121022dbf17c32503ed18be302c0cee219b394c Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Sat, 10 Feb 2024 13:06:22 +1100 +Subject: [PATCH 1/2] Revert "explorer: Set layered style on systray icons only + when it's actually layered." + +This reverts commit b5c57b9a62c396068d18237bd6e82b37c169fdc5. +--- + programs/explorer/systray.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c +index c76ebdd0c92..74e5c3b6b48 100644 +--- a/programs/explorer/systray.c ++++ b/programs/explorer/systray.c +@@ -624,7 +624,6 @@ static BOOL show_icon(struct icon *icon) + { + icon->display = ICON_DISPLAY_DOCKED; + icon->layered = TRUE; +- SetWindowLongW( icon->window, GWL_EXSTYLE, GetWindowLongW( icon->window, GWL_EXSTYLE ) | WS_EX_LAYERED ); + SendMessageW( icon->window, WM_SIZE, SIZE_RESTORED, MAKELONG( icon_cx, icon_cy ) ); + } + systray_add_icon( icon ); +@@ -646,7 +645,6 @@ static BOOL hide_icon(struct icon *icon) + { + icon->display = ICON_DISPLAY_HIDDEN; + icon->layered = FALSE; +- SetWindowLongW( icon->window, GWL_EXSTYLE, GetWindowLongW( icon->window, GWL_EXSTYLE ) & ~WS_EX_LAYERED ); + } + ShowWindow( icon->window, SW_HIDE ); + systray_remove_icon( icon ); +@@ -734,7 +732,7 @@ static BOOL add_icon(NOTIFYICONDATAW *nid) + icon->owner = nid->hWnd; + icon->display = ICON_DISPLAY_HIDDEN; + +- CreateWindowExW( 0, tray_icon_class.lpszClassName, NULL, WS_CLIPSIBLINGS | WS_POPUP, ++ CreateWindowExW( WS_EX_LAYERED, tray_icon_class.lpszClassName, NULL, WS_CLIPSIBLINGS | WS_POPUP, + 0, 0, icon_cx, icon_cy, 0, NULL, NULL, icon ); + if (!icon->window) ERR( "Failed to create systray icon window\n" ); + +-- +2.43.0 + diff --git a/patches/explorer-reverts/0002-Revert-explorer-Don-t-activate-the-systray-icon-when.patch b/patches/explorer-reverts/0002-Revert-explorer-Don-t-activate-the-systray-icon-when.patch new file mode 100644 index 00000000..3be2bb30 --- /dev/null +++ b/patches/explorer-reverts/0002-Revert-explorer-Don-t-activate-the-systray-icon-when.patch @@ -0,0 +1,45 @@ +From 57bf893be6bae301dbc1099615096d2f3644119b Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Sat, 10 Feb 2024 13:06:23 +1100 +Subject: [PATCH 2/2] Revert "explorer: Don't activate the systray icon when + showing it." + +This reverts commit 5e7a8f4db045d456913f9bd7075191ad14053375. +--- + programs/explorer/systray.c | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c +index 74e5c3b6b48..43187db30b5 100644 +--- a/programs/explorer/systray.c ++++ b/programs/explorer/systray.c +@@ -543,15 +543,6 @@ static LRESULT WINAPI tray_icon_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPA + break; + } + +- case WM_WINDOWPOSCHANGING: +- if (icon->display == ICON_DISPLAY_HIDDEN) +- { +- /* Changing the icon's parent via SetParent would activate it, stealing the focus. */ +- WINDOWPOS *wp = (WINDOWPOS*)lparam; +- wp->flags |= SWP_NOACTIVATE; +- } +- break; +- + case WM_WINDOWPOSCHANGED: + update_systray_balloon_position(); + break; +@@ -575,9 +566,9 @@ static void systray_add_icon( struct icon *icon ) + + if (icon->display != ICON_DISPLAY_HIDDEN) return; /* already added */ + ++ icon->display = nb_displayed++; + SetWindowLongW( icon->window, GWL_STYLE, GetWindowLongW( icon->window, GWL_STYLE ) | WS_CHILD ); + SetParent( icon->window, tray_window ); +- icon->display = nb_displayed++; + pos = get_icon_pos( icon ); + SetWindowPos( icon->window, 0, pos.x, pos.y, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW ); + +-- +2.43.0 + diff --git a/patches/explorer-reverts/definition b/patches/explorer-reverts/definition new file mode 100644 index 00000000..2ccff101 --- /dev/null +++ b/patches/explorer-reverts/definition @@ -0,0 +1,4 @@ +# These are causing a regression with Steam +# Close stream to cause it to minimize as an icon, fails to show icon. + +# Debian using XFCE