Store media viewer geometry the same way as main window

This commit is contained in:
Ilya Fedin 2024-06-18 03:01:46 +04:00 committed by John Preston
parent eaf4575eb8
commit 750ad600be

View file

@ -867,7 +867,8 @@ void OverlayWidget::savePosition() {
} else if (!_wasWindowedMode && !Platform::IsMac()) {
return;
} else {
auto r = _normalGeometry = _window->geometry();
auto r = _normalGeometry = _window->body()->mapToGlobal(
_window->body()->rect());
realPosition.x = r.x();
realPosition.y = r.y();
realPosition.w = r.width();
@ -912,7 +913,7 @@ void OverlayWidget::updateGeometry(bool inMove) {
.arg(_normalGeometry.y())
.arg(_normalGeometry.width())
.arg(_normalGeometry.height()));
_window->RpWidget::setGeometry(_normalGeometry);
_window->setGeometry(_normalGeometry);
}
if constexpr (!Platform::IsMac()) {
if (_fullscreen) {