mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Don't set screen for media viewer on Wayland
This commit is contained in:
@@ -441,7 +441,12 @@ void OverlayWidget::moveToScreen() {
|
|||||||
: nullptr;
|
: nullptr;
|
||||||
const auto activeWindowScreen = widgetScreen(window);
|
const auto activeWindowScreen = widgetScreen(window);
|
||||||
const auto myScreen = widgetScreen(this);
|
const auto myScreen = widgetScreen(this);
|
||||||
if (activeWindowScreen && myScreen && myScreen != activeWindowScreen) {
|
// Wayland doesn't support positioning, but Qt emits screenChanged anyway
|
||||||
|
// and geometry of the widget become broken
|
||||||
|
if (activeWindowScreen
|
||||||
|
&& myScreen
|
||||||
|
&& myScreen != activeWindowScreen
|
||||||
|
&& !Platform::IsWayland()) {
|
||||||
windowHandle()->setScreen(activeWindowScreen);
|
windowHandle()->setScreen(activeWindowScreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user