Activate start menu window only after search focus was set

Start menu window was activated early in the process of its creation.
This means it was receiving input before focus was set to search bar.
And that may have lead to unwanted use of keyboard accelerators.

We need to make sure that window is activated (receives input) only once
focus was set to search box.

Fixes #1068
This commit is contained in:
ge0rdi
2022-12-18 22:13:37 +01:00
parent 2a7fc0034c
commit fad20ba4c7

View File

@@ -8237,7 +8237,7 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
s_UserPicture.Init(pStartMenu);
}
dummyRc.right++;
pStartMenu->SetWindowPos(NULL,&dummyRc,SWP_NOZORDER);
pStartMenu->SetWindowPos(NULL,&dummyRc,SWP_NOZORDER|SWP_NOACTIVATE);
memset(&s_StartRect,0,sizeof(s_StartRect));
@@ -8566,7 +8566,7 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
// reposition start menu
if (bTopMost || !s_bBehindTaskbar)
animFlags|=AW_TOPMOST;
pStartMenu->SetWindowPos((animFlags&AW_TOPMOST)?HWND_TOPMOST:HWND_TOP,corner.x,corner.y,0,0,(initialMonitor!=s_MenuMonitor && !bAllPrograms)?SWP_NOMOVE|SWP_NOSIZE:0);
pStartMenu->SetWindowPos((animFlags&AW_TOPMOST)?HWND_TOPMOST:HWND_TOP,corner.x,corner.y,0,0,((initialMonitor!=s_MenuMonitor && !bAllPrograms)?SWP_NOMOVE|SWP_NOSIZE:0)|SWP_NOACTIVATE);
pStartMenu->InitItems();
pStartMenu->m_MaxWidth=s_MainMenuLimits.right-s_MainMenuLimits.left;