Skip to content

Commit

Permalink
Fix custom button auto-hiding (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
ge0rdi authored Dec 4, 2024
1 parent 4e7ca97 commit f60e2a1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,14 @@ static void UpdateStartButtonPosition(const TaskbarInfo* taskBar, const WINDOWPO
RecreateStartButton(taskBar->taskbarId);

RECT rcTask;
GetWindowRect(taskBar->taskBar, &rcTask);
if (RECT rc; GetWindowRgnBox(taskBar->taskBar, &rc) != ERROR)
{
MapWindowPoints(taskBar->taskBar, NULL, (POINT*)&rc, 2);
rcTask = rc;
}
MONITORINFO info;
UINT uEdge = GetTaskbarPosition(taskBar->taskBar, &info, NULL, &rcTask);
UINT uEdge = GetTaskbarPosition(taskBar->taskBar, &info, NULL, NULL);
DWORD buttonFlags = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE;
if (IsWindowVisible(taskBar->taskBar))
buttonFlags |= SWP_SHOWWINDOW;
Expand Down

0 comments on commit f60e2a1

Please sign in to comment.