diff options
author | John Preston <johnprestonmail@gmail.com> | 2018-08-04 21:10:52 +0300 |
---|---|---|
committer | John Preston <johnprestonmail@gmail.com> | 2018-08-04 21:12:34 +0300 |
commit | b4aa213c64c0b270f944cfcec5792ee5df2eb5e1 (patch) | |
tree | e3d8fb623988795311a5643f997dfb07bdb8bec9 | |
parent | a241e102080e191216d9bb273bb809e5a34ab989 (diff) |
Make MediaView modal with MainWindow transient parent on Linux.
There is hope :) that it will force MediaView to be floating in tiling WMs.
Possibly fixes #5048.
-rw-r--r-- | Telegram/SourceFiles/mediaview.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 385ea44134..880438d2fa 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -125,6 +125,10 @@ MediaView::MediaView() hide(); createWinId(); + if (cPlatform() == dbipLinux32 || cPlatform() == dbipLinux64) { + windowHandle()->setTransientParent(App::wnd()->windowHandle()); + setWindowModality(Qt::WindowModal); + } if (cPlatform() != dbipMac && cPlatform() != dbipMacOld) { setWindowState(Qt::WindowFullScreen); } |