From 6e6060d7d938c40864be105e75db3ec70afbfd1e Mon Sep 17 00:00:00 2001 From: routersys Date: Thu, 10 Sep 2026 11:03:20 +0900 Subject: [PATCH] =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E7=94=BB=E9=9D=A2=E3=81=8C?= =?UTF-8?q?=E6=9C=AC=E4=BD=93=E3=82=92=E6=AD=A2=E3=82=81=E3=82=8B=E3=81=AE?= =?UTF-8?q?=E3=82=92=E3=82=84=E3=82=81=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SettingsDialog.cpp | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/SettingsDialog.cpp b/src/SettingsDialog.cpp index ae977aa..fe3c151 100644 --- a/src/SettingsDialog.cpp +++ b/src/SettingsDialog.cpp @@ -192,6 +192,11 @@ LRESULT CALLBACK SettingsProc(HWND window, UINT message, WPARAM first, LPARAM se return 0; case WM_DESTROY: g_closed = true; + g_window = nullptr; + if (g_font) { + DeleteObject(g_font); + g_font = nullptr; + } return 0; default: break; @@ -230,23 +235,7 @@ void OnConfigMenu(HWND owner, HINSTANCE) { SetWindowPos(g_window, nullptr, x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER); } ShowWindow(g_window, SW_SHOW); - if (owner) EnableWindow(owner, FALSE); - - MSG message; - while (!g_closed && GetMessageW(&message, nullptr, 0, 0)) { - if (IsDialogMessageW(g_window, &message)) continue; - TranslateMessage(&message); - DispatchMessageW(&message); - } - if (owner) { - EnableWindow(owner, TRUE); - SetForegroundWindow(owner); - } - g_window = nullptr; - if (g_font) { - DeleteObject(g_font); - g_font = nullptr; - } + SetForegroundWindow(g_window); } }