2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Set parent for dialogs only on Wayland

This commit is contained in:
Ilya Fedin
2020-05-27 09:50:07 +04:00
committed by John Preston
parent b7aa60bedf
commit be96bf2812
5 changed files with 11 additions and 3 deletions

View File

@@ -767,6 +767,13 @@ void Application::notifyFileDialogShown(bool shown) {
}
}
QWidget *Application::getModalParent() {
return QGuiApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive)
? App::wnd()
: nullptr;
}
void Application::checkMediaViewActivation() {
if (_mediaView && !_mediaView->isHidden()) {
_mediaView->activateWindow();