diff --git a/src/MEGASync/gui/InfoDialog.cpp b/src/MEGASync/gui/InfoDialog.cpp index fe6b65cf6..f3fa0fd05 100644 --- a/src/MEGASync/gui/InfoDialog.cpp +++ b/src/MEGASync/gui/InfoDialog.cpp @@ -148,7 +148,7 @@ InfoDialog::InfoDialog(MegaApplication *app, QWidget *parent, InfoDialog* olddia // To avoid issues with text input we implement a popup ourselves // instead of using Qt::Popup by listening to the WindowDeactivate // event. - Qt::WindowFlags flags = Qt::FramelessWindowHint; + Qt::WindowFlags flags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint; if (Platform::getInstance()->isTilingWindowManager()) { diff --git a/src/MEGASync/main.cpp b/src/MEGASync/main.cpp index 6832501a4..8622b776b 100644 --- a/src/MEGASync/main.cpp +++ b/src/MEGASync/main.cpp @@ -377,17 +377,6 @@ int main(int argc, char *argv[]) } #endif -#if defined(Q_OS_LINUX) - if (!(getenv("DO_NOT_UNSET_XDG_SESSION_TYPE"))) - { - if ( getenv("XDG_SESSION_TYPE") && !strcmp(getenv("XDG_SESSION_TYPE"),"wayland") ) - { - std::cerr << "Avoiding wayland" << std::endl; - unsetenv("XDG_SESSION_TYPE"); - } - } -#endif - #ifndef Q_OS_MACX #if defined(WIN32) ScaleFactorManager scaleFactorManager(OsType::WIN); diff --git a/src/MEGASync/platform/linux/PlatformImplementation.cpp b/src/MEGASync/platform/linux/PlatformImplementation.cpp index d4fede6bc..34a89fc18 100644 --- a/src/MEGASync/platform/linux/PlatformImplementation.cpp +++ b/src/MEGASync/platform/linux/PlatformImplementation.cpp @@ -108,6 +108,8 @@ bool PlatformImplementation::isStartOnStartupActive() bool PlatformImplementation::isTilingWindowManager() { static const QSet tiling_wms = { + QString::fromUtf8("sway"), + QString::fromUtf8("wayfire"), QString::fromUtf8("i3") }; @@ -308,6 +310,9 @@ QString PlatformImplementation::getWindowManagerName() { static QString wmName; static bool cached = false; + if (qgetenv("XDG_SESSION_TYPE") == "wayland") { + return QString::fromLocal8Bit(qgetenv("XDG_CURRENT_DESKTOP")); + } if (!cached) {