mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 22:12:05 +00:00
[EXPLORER] Fix Taskbar context menu Z-order bug (#8186)
Taskbar task button context menu was wrongly overlapped by Taskbar. #8105 introduced this bug. JIRA issue: CORE-20260 - Don't bring the taskbar to top on no rude app. - Check the target window by FindTaskItem in OnWindowActivated and OnWindowDestroyed.
This commit is contained in:
parent
c720dd4960
commit
4866a25a8f
1 changed files with 10 additions and 8 deletions
|
@ -1957,20 +1957,18 @@ public:
|
|||
Data.pTray = m_Tray;
|
||||
::EnumDisplayMonitors(NULL, NULL, FullScreenEnumProc, (LPARAM)&Data);
|
||||
|
||||
// Make the taskbar bottom or top
|
||||
UINT uFlags = SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER;
|
||||
HWND hwndTray = m_Tray->GetHWND();
|
||||
::SetWindowPos(hwndTray, (hwndRude ? HWND_BOTTOM : HWND_TOP), 0, 0, 0, 0, uFlags);
|
||||
|
||||
if (hwndRude)
|
||||
{
|
||||
// Make the taskbar bottom
|
||||
UINT uFlags = SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER;
|
||||
HWND hwndTray = m_Tray->GetHWND();
|
||||
::SetWindowPos(hwndTray, HWND_BOTTOM, 0, 0, 0, 0, uFlags);
|
||||
|
||||
// Switch to the rude app if necessary
|
||||
DWORD exstyle = (DWORD)::GetWindowLongPtrW(hwndRude, GWL_EXSTYLE);
|
||||
if (!(exstyle & WS_EX_TOPMOST) && !SHELL_IsRudeWindowActive(hwndRude))
|
||||
::SwitchToThisWindow(hwndRude, TRUE);
|
||||
}
|
||||
|
||||
// FIXME: NIN_BALLOONHIDE
|
||||
// FIXME: NIN_POPUPCLOSE
|
||||
}
|
||||
|
||||
HWND FindRudeApp(_In_opt_ HWND hwndFirstCheck)
|
||||
|
@ -2001,6 +1999,8 @@ public:
|
|||
// HSHELL_WINDOWACTIVATED, HSHELL_RUDEAPPACTIVATED
|
||||
void OnWindowActivated(_In_ HWND hwndTarget)
|
||||
{
|
||||
if (!FindTaskItem(hwndTarget))
|
||||
return;
|
||||
// Re-start rude app validation
|
||||
KillTimer(TIMER_ID_VALIDATE_RUDE_APP);
|
||||
SetTimer(TIMER_ID_VALIDATE_RUDE_APP, VALIDATE_RUDE_INTERVAL, NULL);
|
||||
|
@ -2010,6 +2010,8 @@ public:
|
|||
// HSHELL_WINDOWDESTROYED
|
||||
void OnWindowDestroyed(_In_ HWND hwndTarget)
|
||||
{
|
||||
if (!FindTaskItem(hwndTarget))
|
||||
return;
|
||||
HWND hwndRude = FindRudeApp(hwndTarget);
|
||||
HandleFullScreenApp(hwndRude);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue