Qt: Ensure window is raised after recreation
Should hopefully help with raw input issues.
This commit is contained in:
parent
41fb5d3d9a
commit
a8cac70ee6
|
@ -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 New Issue