mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 15:15:40 +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);
|
setMouseTracking(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayWidget::~DisplayWidget()
|
DisplayWidget::~DisplayWidget() = default;
|
||||||
{
|
|
||||||
#ifdef _WIN32
|
|
||||||
if (m_clip_mouse_enabled)
|
|
||||||
ClipCursor(nullptr);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
int DisplayWidget::scaledWindowWidth() const
|
int DisplayWidget::scaledWindowWidth() const
|
||||||
{
|
{
|
||||||
|
@ -157,6 +151,11 @@ void DisplayWidget::destroy()
|
||||||
{
|
{
|
||||||
m_destroying = true;
|
m_destroying = true;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (m_clip_mouse_enabled)
|
||||||
|
ClipCursor(nullptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// See Qt documentation, entire application is in full screen state, and the main
|
// 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
|
// 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();
|
updateDisplayWidgetCursor();
|
||||||
updateDisplayRelatedActions(true, render_to_main, fullscreen);
|
updateDisplayRelatedActions(true, render_to_main, fullscreen);
|
||||||
|
QtUtils::ShowOrRaiseWindow(QtUtils::GetRootWidget(m_display_widget));
|
||||||
m_display_widget->setFocus();
|
m_display_widget->setFocus();
|
||||||
|
|
||||||
return wi;
|
return wi;
|
||||||
|
|
Loading…
Reference in a new issue