From 5fd486014b4ebc55446305e20f85e7a9e08d5a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 7 Jan 2017 22:43:27 +0100 Subject: [PATCH] DolphinWX: Always keep panic alerts on top This should prevent silly things like panic alerts opening *behind* the render window and thus being impossible to see. --- Source/Core/DolphinWX/Frame.cpp | 5 +++-- Source/Core/DolphinWX/Main.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index daa7f7b5d5..8b688f7e90 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -707,8 +707,9 @@ void CFrame::OnHostMessage(wxCommandEvent& event) { wxString caption = event.GetString().BeforeFirst(':'); wxString text = event.GetString().AfterFirst(':'); - bPanicResult = (wxYES == wxMessageBox(text, caption, event.GetInt() ? wxYES_NO : wxOK, - wxWindow::FindFocus())); + bPanicResult = + (wxYES == wxMessageBox(text, caption, wxSTAY_ON_TOP | (event.GetInt() ? wxYES_NO : wxOK), + wxWindow::FindFocus())); panic_event.Set(); } break; diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index e32e6c9968..87cb22f27f 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -360,7 +360,8 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style* npd->AppendChat("/!\\ " + std::string{text}); return true; } - return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption), (yes_no) ? wxYES_NO : wxOK, + return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption), + wxSTAY_ON_TOP | ((yes_no) ? wxYES_NO : wxOK), wxWindow::FindFocus()); } else