mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Query QWindow::windowState in media viewer
This commit is contained in:
parent
707951accb
commit
36f6917bd3
1 changed files with 4 additions and 4 deletions
|
@ -506,15 +506,15 @@ OverlayWidget::OverlayWidget()
|
||||||
return base::EventFilterResult::Cancel;
|
return base::EventFilterResult::Cancel;
|
||||||
}
|
}
|
||||||
} else if (e->type() == QEvent::WindowStateChange) {
|
} else if (e->type() == QEvent::WindowStateChange) {
|
||||||
const auto state = _window->windowState();
|
const auto state = window()->windowState();
|
||||||
if (state & Qt::WindowMinimized || Platform::IsMac()) {
|
if (state == Qt::WindowMinimized || Platform::IsMac()) {
|
||||||
} else if (state & Qt::WindowMaximized) {
|
} else if (state == Qt::WindowMaximized) {
|
||||||
if (_fullscreen || _windowed) {
|
if (_fullscreen || _windowed) {
|
||||||
_fullscreen = _windowed = false;
|
_fullscreen = _windowed = false;
|
||||||
savePosition();
|
savePosition();
|
||||||
}
|
}
|
||||||
} else if (_fullscreen || _windowed) {
|
} else if (_fullscreen || _windowed) {
|
||||||
} else if (state & Qt::WindowFullScreen) {
|
} else if (state == Qt::WindowFullScreen) {
|
||||||
_fullscreen = true;
|
_fullscreen = true;
|
||||||
savePosition();
|
savePosition();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue