Commit 78e2351c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

qt: Fix crash when switching to fullscreen with video undocked

Fix #19503
parent b7e3e156
......@@ -877,12 +877,16 @@ void FullscreenControllerWidget::restoreFSC()
return;
QRect currentRes = QApplication::desktop()->screenGeometry( targetScreen() );
QWindow *wh = windowHandle();
if ( wh != Q_NULLPTR )
{
#ifdef QT5_HAS_WAYLAND
if ( !b_hasWayland )
windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]);
if ( !b_hasWayland )
wh->setScreen(QGuiApplication::screens()[targetScreen()]);
#else
windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]);
wh->setScreen(QGuiApplication::screens()[targetScreen()]);
#endif
}
if( currentRes == screenRes &&
QApplication::desktop()->screen()->geometry().contains( previousPosition, true ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment