mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-29 00:55:41 +00:00
Qt: Ensure window is raised after recreation
Should hopefully help with raw input issues.
This commit is contained in:
parent
0c3051e35f
commit
54c79ff937
|
@ -44,13 +44,7 @@ DisplayWidget::DisplayWidget(QWidget* parent) : QWidget(parent)
|
|||
setMouseTracking(true);
|
||||
}
|
||||
|
||||
DisplayWidget::~DisplayWidget()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (m_clip_mouse_enabled)
|
||||
ClipCursor(nullptr);
|
||||
#endif
|
||||
}
|
||||
DisplayWidget::~DisplayWidget() = default;
|
||||
|
||||
int DisplayWidget::scaledWindowWidth() const
|
||||
{
|
||||
|
@ -157,6 +151,11 @@ void DisplayWidget::destroy()
|
|||
{
|
||||
m_destroying = true;
|
||||
|
||||
#ifdef _WIN32
|
||||
if (m_clip_mouse_enabled)
|
||||
ClipCursor(nullptr);
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
// See Qt documentation, entire application is in full screen state, and the main
|
||||
// window will get reopened fullscreen instead of windowed if we don't close the
|
||||
|
|
|
@ -309,6 +309,7 @@ std::optional<WindowInfo> MainWindow::acquireRenderWindow(bool recreate_window,
|
|||
|
||||
updateDisplayWidgetCursor();
|
||||
updateDisplayRelatedActions(true, render_to_main, fullscreen);
|
||||
QtUtils::ShowOrRaiseWindow(QtUtils::GetRootWidget(m_display_widget));
|
||||
m_display_widget->setFocus();
|
||||
|
||||
return wi;
|
||||
|
|
Loading…
Reference in a new issue