Skip to content

Commit 4705b35

Browse files
committed
Fix Aero button alignment on multiple monitors (#1310)
Shift Aero button slightly when it is positioned in corner of any monitor (not just primary one). Moreover this shift should be done only for top/bottom taskbar.
1 parent 073035b commit 4705b35

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,12 +1313,12 @@ static void UpdateStartButtonPosition(const TaskbarInfo* taskBar, const WINDOWPO
13131313
y = rcTask.top;
13141314
else
13151315
y = rcTask.bottom - taskBar->startButtonSize.cy;
1316-
}
13171316

1318-
// Start button on Win11 is a bit shifted to the right
1319-
// We will shift our Aero button to cover original button
1320-
if (IsWin11() && (x == 0) && (GetStartButtonType() == START_BUTTON_AERO))
1321-
x += ScaleForDpi(taskBar->taskBar, 6);
1317+
// Start button on Win11 is a bit shifted to the right
1318+
// We will shift our Aero button to cover original button
1319+
if (IsWin11() && (x == info.rcMonitor.left) && (GetStartButtonType() == START_BUTTON_AERO))
1320+
x += ScaleForDpi(taskBar->taskBar, 6);
1321+
}
13221322

13231323
RECT rcButton = { x, y, x + taskBar->startButtonSize.cx, y + taskBar->startButtonSize.cy };
13241324
RECT rc;

0 commit comments

Comments
 (0)