Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't avoid wayland #992

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MEGASync/gui/InfoDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down
11 changes: 0 additions & 11 deletions src/MEGASync/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions src/MEGASync/platform/linux/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ bool PlatformImplementation::isStartOnStartupActive()
bool PlatformImplementation::isTilingWindowManager()
{
static const QSet<QString> tiling_wms = {
QString::fromUtf8("sway"),
QString::fromUtf8("wayfire"),
QString::fromUtf8("i3")
};

Expand Down Expand Up @@ -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)
{
Expand Down