Skip to content

Commit

Permalink
Set position of tray buttons on primary taskbar only
Browse files Browse the repository at this point in the history
It seems that secondary taskbars handle try button positioning
correctly. So there is no need for this workaround.

Original change was introduced in 674a486 due to #1232 issue.
  • Loading branch information
ge0rdi committed Jan 4, 2025
1 parent 055ac87 commit 552fbd8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3179,11 +3179,14 @@ static void RecreateStartButton( size_t taskbarId )
RECT rcTask;
GetWindowRect(taskBar.taskBar,&rcTask);
PostMessage(taskBar.taskBar,WM_SIZE,SIZE_RESTORED,MAKELONG(rcTask.right-rcTask.left,rcTask.bottom-rcTask.top));
for (auto btn : taskBar.trayButtons)
if (taskBar.taskBar==g_TaskBar)
{
RECT rc;
GetWindowRect(btn,&rc);
SetWindowPos(btn,HWND_TOP,rc.left,rc.top,0,0,SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER);
for (auto btn : taskBar.trayButtons)
{
RECT rc;
GetWindowRect(btn,&rc);
SetWindowPos(btn,HWND_TOP,rc.left,rc.top,0,0,SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER);
}
}
}
}
Expand Down

0 comments on commit 552fbd8

Please sign in to comment.