mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 12:24:48 +00:00
[TASKMGR] Do not disable status bar when opening system menu (#5571)
We do not need to clean the status bar when opening the system menu as it does not show any hints. CORE-19061
This commit is contained in:
parent
a995d8d614
commit
2d53e953cd
2 changed files with 16 additions and 10 deletions
|
@ -482,14 +482,23 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
TrayIcon_UpdateIcon();
|
TrayIcon_UpdateIcon();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_INITMENUPOPUP:
|
||||||
|
/* Do not disable the status bar if we opened the system menu */
|
||||||
|
if (!HIWORD(lParam))
|
||||||
|
TaskManager_DisableStatusBar(hDlg);
|
||||||
|
else
|
||||||
|
TaskManager_EnableStatusBar(hDlg);
|
||||||
|
break;
|
||||||
case WM_ENTERMENULOOP:
|
case WM_ENTERMENULOOP:
|
||||||
TaskManager_OnEnterMenuLoop(hDlg);
|
bInMenuLoop = TRUE;
|
||||||
break;
|
break;
|
||||||
case WM_EXITMENULOOP:
|
case WM_EXITMENULOOP:
|
||||||
TaskManager_OnExitMenuLoop(hDlg);
|
bInMenuLoop = FALSE;
|
||||||
|
TaskManager_EnableStatusBar(hDlg);
|
||||||
break;
|
break;
|
||||||
case WM_MENUSELECT:
|
case WM_MENUSELECT:
|
||||||
TaskManager_OnMenuSelect(hDlg, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam);
|
if (!(HIWORD(wParam) & MF_SYSMENU))
|
||||||
|
TaskManager_OnMenuSelect(hDlg, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam);
|
||||||
break;
|
break;
|
||||||
case WM_SYSCOLORCHANGE:
|
case WM_SYSCOLORCHANGE:
|
||||||
/* Forward WM_SYSCOLORCHANGE to common controls */
|
/* Forward WM_SYSCOLORCHANGE to common controls */
|
||||||
|
@ -887,24 +896,21 @@ void TaskManager_OnRestoreMainWindow(void)
|
||||||
SetWindowPos(hMainWnd, (OnTop ? HWND_TOPMOST : HWND_TOP), 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW);
|
SetWindowPos(hMainWnd, (OnTop ? HWND_TOPMOST : HWND_TOP), 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskManager_OnEnterMenuLoop(HWND hWnd)
|
void TaskManager_DisableStatusBar(HWND hWnd)
|
||||||
{
|
{
|
||||||
int nParts;
|
int nParts;
|
||||||
|
|
||||||
/* Update the status bar pane sizes */
|
/* Update the status bar pane sizes */
|
||||||
nParts = -1;
|
nParts = -1;
|
||||||
SendMessageW(hStatusWnd, SB_SETPARTS, 1, (LPARAM) (LPINT)&nParts);
|
SendMessageW(hStatusWnd, SB_SETPARTS, 1, (LPARAM) (LPINT)&nParts);
|
||||||
bInMenuLoop = TRUE;
|
|
||||||
SendMessageW(hStatusWnd, SB_SETTEXT, (WPARAM)0, (LPARAM)L"");
|
SendMessageW(hStatusWnd, SB_SETTEXT, (WPARAM)0, (LPARAM)L"");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskManager_OnExitMenuLoop(HWND hWnd)
|
void TaskManager_EnableStatusBar(HWND hWnd)
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
int nParts[3];
|
int nParts[3];
|
||||||
|
|
||||||
bInMenuLoop = FALSE;
|
|
||||||
|
|
||||||
/* Update the status bar pane sizes */
|
/* Update the status bar pane sizes */
|
||||||
GetClientRect(hWnd, &rc);
|
GetClientRect(hWnd, &rc);
|
||||||
nParts[0] = STATUS_SIZE1;
|
nParts[0] = STATUS_SIZE1;
|
||||||
|
|
|
@ -94,8 +94,8 @@ void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr);
|
||||||
void LoadSettings(void);
|
void LoadSettings(void);
|
||||||
void SaveSettings(void);
|
void SaveSettings(void);
|
||||||
void TaskManager_OnRestoreMainWindow(void);
|
void TaskManager_OnRestoreMainWindow(void);
|
||||||
void TaskManager_OnEnterMenuLoop(HWND hWnd);
|
void TaskManager_DisableStatusBar(HWND hWnd);
|
||||||
void TaskManager_OnExitMenuLoop(HWND hWnd);
|
void TaskManager_EnableStatusBar(HWND hWnd);
|
||||||
void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu);
|
void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu);
|
||||||
void TaskManager_OnViewUpdateSpeed(DWORD);
|
void TaskManager_OnViewUpdateSpeed(DWORD);
|
||||||
void TaskManager_OnTabWndSelChange(void);
|
void TaskManager_OnTabWndSelChange(void);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue