mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-09-04 19:13:05 +02:00
Don't set screen for media viewer on Wayland
This commit is contained in:
parent
b2047c9558
commit
76a7cc9229
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue