Re-check the screen media viewer appears on before adjusting geometry

This commit is contained in:
Ilya Fedin 2020-11-10 17:14:43 +04:00 committed by John Preston
parent 2df7e4181f
commit c3b638449a
1 changed files with 1 additions and 3 deletions

View File

@ -432,9 +432,7 @@ void OverlayWidget::moveToScreen(bool force) {
if (activeWindowScreen && myScreen && myScreen != activeWindowScreen) {
windowHandle()->setScreen(activeWindowScreen);
}
const auto screen = activeWindowScreen
? activeWindowScreen
: QApplication::primaryScreen();
const auto screen = widgetScreen(this);
const auto available = screen->geometry();
if (!force && geometry() == available) {
return;