mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:52:56 +00:00
[RAPPS] Hide the main window during active download/install if the user closes it (#7014)
This commit is contained in:
parent
2f83e6a65d
commit
053939e27c
7 changed files with 55 additions and 2 deletions
|
@ -318,13 +318,13 @@ CMainWindow::ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPa
|
|||
case WM_CREATE:
|
||||
if (!InitControls())
|
||||
::PostMessageW(hwnd, WM_CLOSE, 0, 0);
|
||||
::PostMessageW(hwnd, DM_REPOSITION, 0, 0);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
{
|
||||
ShowWindow(SW_HIDE);
|
||||
hMainWnd = NULL;
|
||||
SaveSettings(hwnd, &SettingsInfo);
|
||||
|
||||
FreeLogs();
|
||||
|
||||
delete m_ClientPanel;
|
||||
|
@ -333,6 +333,19 @@ CMainWindow::ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPa
|
|||
return 0;
|
||||
}
|
||||
|
||||
case WM_CLOSE:
|
||||
ShowWindow(SW_HIDE);
|
||||
return g_Busy;
|
||||
|
||||
case WM_NOTIFY_OPERATIONCOMPLETED:
|
||||
if (!g_Busy && !IsWindowVisible())
|
||||
SendMessage(WM_CLOSE, 0, 0);
|
||||
break;
|
||||
|
||||
case DM_REPOSITION:
|
||||
EmulateDialogReposition(hwnd); // We are not a real dialog, we need help from a real one
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
OnCommand(wParam, lParam);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue