From 3b16ee4c238b3dda7858d3c2e26535b07a2317b4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 Sep 2023 19:25:12 +0300 Subject: nasty crutch for Windows 10 taskbar icon --- plugins/TabSRMM/src/taskbar.cpp | 9 ++++++++- plugins/TabSRMM/src/taskbar.h | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'plugins/TabSRMM') diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index d49d937af5..0cdaa05fee 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -111,10 +111,17 @@ bool CTaskbarInteract::haveLargeIcons() ///////////////////////////////////////////////////////////////////////////////////////// // removes the overlay icon for the given container window +unsigned __cdecl CTaskbarInteract::sttSetOverlay(void *owner, void *param) +{ + auto *pClass = (CTaskbarInteract *)owner; + pClass->m_pTaskbarInterface->SetOverlayIcon((HWND)param, nullptr, nullptr); + return 0; +} + void CTaskbarInteract::clearOverlayIcon(HWND hwndDlg) const { if (m_pTaskbarInterface && m_isEnabled) - m_pTaskbarInterface->SetOverlayIcon(hwndDlg, nullptr, nullptr); + mir_forkthreadowner(sttSetOverlay, (void*)this, hwndDlg); } LONG CTaskbarInteract::updateMetrics() diff --git a/plugins/TabSRMM/src/taskbar.h b/plugins/TabSRMM/src/taskbar.h index ed407dadbd..de431680f2 100644 --- a/plugins/TabSRMM/src/taskbar.h +++ b/plugins/TabSRMM/src/taskbar.h @@ -183,6 +183,8 @@ public: private: ITaskbarList3 *m_pTaskbarInterface; + static unsigned __cdecl sttSetOverlay(void *owner, void *param); + bool m_isEnabled; bool m_fHaveLargeicons; bool m_fHaveAlwaysGrouping; -- cgit v1.2.3