From f22f10c7d5e516bd51b2cf891df225fbf3eceb3b Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Sat, 4 Jan 2025 16:10:52 +0100 Subject: [PATCH] Apply taskbar customizations to News and interests Fixes #676 --- Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp | 5 +++++ Src/StartMenu/StartMenuDLL/StartMenuDLL.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp b/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp index 1a3c64db0..7cf742a2c 100644 --- a/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp +++ b/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp @@ -3106,6 +3106,9 @@ static void InitStartMenuDLL( void ) taskBar.chevron=FindWindowEx(tray,NULL,L"Button",NULL); if (taskBar.chevron) SetWindowSubclass(taskBar.chevron,SubclassTrayChevronProc,'CLSH',taskBar.taskbarId); + taskBar.news=FindWindowEx(g_TaskBar,NULL,L"DynamicContent2",NULL); + if (taskBar.news) + SetWindowSubclass(taskBar.news,SubclassTrayChevronProc,'CLSH',taskBar.taskbarId); } HandleTaskbarParts(taskBar,true); @@ -3295,6 +3298,8 @@ if (!g_bTrimHooks) } if (it->second.chevron) RemoveWindowSubclass(it->second.chevron,SubclassTrayChevronProc,'CLSH'); + if (it->second.news) + RemoveWindowSubclass(it->second.news,SubclassTrayChevronProc,'CLSH'); if (it->second.desktop) RemoveWindowSubclass(it->second.desktop,SubclassDesktopButtonProc,'CLSH'); if (it->second.bTimer) diff --git a/Src/StartMenu/StartMenuDLL/StartMenuDLL.h b/Src/StartMenu/StartMenuDLL/StartMenuDLL.h index fb27b980a..456a88475 100644 --- a/Src/StartMenu/StartMenuDLL/StartMenuDLL.h +++ b/Src/StartMenu/StartMenuDLL/StartMenuDLL.h @@ -47,7 +47,7 @@ void EnableStartTooltip( bool bEnable ); struct TaskbarInfo { - TaskbarInfo( void ) { taskbarId=pointerId=0; taskBar=startButton=oldButton=rebar=taskList=chevron=desktop=NULL; startButtonSize.cx=startButtonSize.cy=0; oldButtonSize.cx=oldButtonSize.cy=0; bTimer=bCustomLook=bReplaceButton=bHideButton=bRecreatingButton=bThemeChanging=false; } + TaskbarInfo( void ) { taskbarId=pointerId=0; taskBar=startButton=oldButton=rebar=taskList=chevron=news=desktop=NULL; startButtonSize.cx=startButtonSize.cy=0; oldButtonSize.cx=oldButtonSize.cy=0; bTimer=bCustomLook=bReplaceButton=bHideButton=bRecreatingButton=bThemeChanging=false; } int taskbarId; HWND taskBar; HWND startButton; // either own start button or the win7 start button (depending on bReplaceButton) @@ -55,6 +55,7 @@ struct TaskbarInfo HWND rebar; HWND taskList; HWND chevron; + HWND news; HWND desktop; SIZE startButtonSize; SIZE oldButtonSize;