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.
This commit is contained in:
Léo Lam 2017-01-07 22:43:27 +01:00
parent 5790f15be8
commit 5fd486014b
2 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -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