Skip to content

Commit 552fbd8

Browse files
committed
Set position of tray buttons on primary taskbar only
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.
1 parent 055ac87 commit 552fbd8

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3179,11 +3179,14 @@ static void RecreateStartButton( size_t taskbarId )
31793179
RECT rcTask;
31803180
GetWindowRect(taskBar.taskBar,&rcTask);
31813181
PostMessage(taskBar.taskBar,WM_SIZE,SIZE_RESTORED,MAKELONG(rcTask.right-rcTask.left,rcTask.bottom-rcTask.top));
3182-
for (auto btn : taskBar.trayButtons)
3182+
if (taskBar.taskBar==g_TaskBar)
31833183
{
3184-
RECT rc;
3185-
GetWindowRect(btn,&rc);
3186-
SetWindowPos(btn,HWND_TOP,rc.left,rc.top,0,0,SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER);
3184+
for (auto btn : taskBar.trayButtons)
3185+
{
3186+
RECT rc;
3187+
GetWindowRect(btn,&rc);
3188+
SetWindowPos(btn,HWND_TOP,rc.left,rc.top,0,0,SWP_NOSIZE|SWP_NOACTIVATE|SWP_NOZORDER);
3189+
}
31873190
}
31883191
}
31893192
}

0 commit comments

Comments
 (0)