From 41e6eb5502eb870ca4afea92c38fdb5eeb99db6b Mon Sep 17 00:00:00 2001 From: "Vladimir M. Zenevich" <85337949+zvm67@users.noreply.github.com> Date: Mon, 18 Nov 2024 18:35:56 +0300 Subject: [PATCH] Center & raise AskPermissionDialog on app window (#264) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handle AskPermissionDialog the same ways as the main window is handled: that is, when it is time to show it, center it on the hosting application and raise it to the top. --------- Co-authored-by: Vladimir M. Zenevich Co-authored-by: Václav Slavík --- src/ui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ui.cpp b/src/ui.cpp index 546ff5b1..453b80ee 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -1355,6 +1355,8 @@ void App::OnUpdateAvailable(wxThreadEvent& event) void App::OnAskForPermission(wxThreadEvent& event) { AskPermissionDialog dlg; + CenterWindowOnHostApplication(&dlg); + dlg.Raise(); bool shouldCheck = (dlg.ShowModal() == wxID_OK); Settings::WriteConfigValue("CheckForUpdates", shouldCheck);