Skip to content

Commit

Permalink
Make sure tray buttons are properly positioned when custom start butt…
Browse files Browse the repository at this point in the history
…on was created

Fixes #1232
  • Loading branch information
ge0rdi committed Dec 28, 2022
1 parent 412accc commit 674a486
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3110,6 +3110,12 @@ 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)
{
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 674a486

Please sign in to comment.