mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-13 20:28:31 +10:00
Fix custom button auto-hiding (#2041)
This commit is contained in:
@@ -1222,8 +1222,14 @@ static void UpdateStartButtonPosition(const TaskbarInfo* taskBar, const WINDOWPO
|
|||||||
RecreateStartButton(taskBar->taskbarId);
|
RecreateStartButton(taskBar->taskbarId);
|
||||||
|
|
||||||
RECT rcTask;
|
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;
|
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;
|
DWORD buttonFlags = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE;
|
||||||
if (IsWindowVisible(taskBar->taskBar))
|
if (IsWindowVisible(taskBar->taskBar))
|
||||||
buttonFlags |= SWP_SHOWWINDOW;
|
buttonFlags |= SWP_SHOWWINDOW;
|
||||||
|
|||||||
Reference in New Issue
Block a user