mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Avoid Windows-specific hack to ruin initial main window geometry on Linux
This commit is contained in:
parent
9ad38b9638
commit
5c4f006550
1 changed files with 4 additions and 2 deletions
|
@ -512,14 +512,16 @@ void Application::startMediaView() {
|
|||
InvokeQueued(this, [=] {
|
||||
_mediaView = std::make_unique<Media::View::OverlayWidget>();
|
||||
});
|
||||
#else // Q_OS_MAC
|
||||
#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_WIN
|
||||
// On Windows we needed such hack for the main window, otherwise
|
||||
// somewhere inside the media viewer creating code its geometry
|
||||
// was broken / lost to some invalid values.
|
||||
const auto current = _lastActivePrimaryWindow->widget()->geometry();
|
||||
_mediaView = std::make_unique<Media::View::OverlayWidget>();
|
||||
_lastActivePrimaryWindow->widget()->Ui::RpWidget::setGeometry(current);
|
||||
#endif // Q_OS_MAC
|
||||
#else
|
||||
_mediaView = std::make_unique<Media::View::OverlayWidget>();
|
||||
#endif // Q_OS_MAC || Q_OS_WIN
|
||||
}
|
||||
|
||||
void Application::startTray() {
|
||||
|
|
Loading…
Add table
Reference in a new issue