mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
Fix possible no-GUI state when using systray
Fixes possible Notepad++ non-GUI state when minimized to systray with an unsaved file, closing from the systray icon & then cancelling that closing from the invoked Notepad++ save dialog. Fix #14777, close #14778
This commit is contained in:
parent
fbd4a40214
commit
ce8fb873a6
@ -2595,6 +2595,15 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||||||
_pluginsManager.notify(&scnN);
|
_pluginsManager.notify(&scnN);
|
||||||
if (isSnapshotMode)
|
if (isSnapshotMode)
|
||||||
::LockWindowUpdate(NULL);
|
::LockWindowUpdate(NULL);
|
||||||
|
|
||||||
|
if (!::IsWindowVisible(hwnd))
|
||||||
|
{
|
||||||
|
// Notepad++ probably has not been restored from the systray
|
||||||
|
// - as its tray-icon was removed before, we have to show the app window otherwise we end up with no-GUI state
|
||||||
|
::ShowWindow(hwnd, SW_SHOW);
|
||||||
|
::SendMessage(hwnd, WM_SIZE, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
return 0; // abort quitting
|
return 0; // abort quitting
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user