Recognize Qtile WM (#2854)

This commit is contained in:
3nprob
2022-10-02 13:20:18 +00:00
committed by GitHub
parent 43e6e9de30
commit 5f67ab50fb
3 changed files with 6 additions and 1 deletions

View File

@@ -31,6 +31,9 @@ DesktopInfo::WM DesktopInfo::windowManager()
if (desktop.contains(QLatin1String("GNOME"), Qt::CaseInsensitive)) {
return DesktopInfo::GNOME;
}
if (desktop.contains(QLatin1String("qtile"), Qt::CaseInsensitive)) {
return DesktopInfo::QTILE;
}
if (desktop.contains(QLatin1String("sway"), Qt::CaseInsensitive)) {
return DesktopInfo::SWAY;
}

View File

@@ -15,6 +15,7 @@ public:
GNOME,
KDE,
OTHER,
QTILE,
SWAY
};

View File

@@ -102,6 +102,7 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
switch (m_info.windowManager()) {
case DesktopInfo::GNOME:
case DesktopInfo::KDE:
case DesktopInfo::QTILE:
case DesktopInfo::SWAY: {
freeDesktopPortal(ok, res);
break;
@@ -110,7 +111,7 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
ok = false;
AbstractLogger::error()
<< tr("Unable to detect desktop environment (GNOME? KDE? "
"Sway? ...)");
"Qile? Sway? ...)");
AbstractLogger::error()
<< tr("Hint: try setting the XDG_CURRENT_DESKTOP environment "
"variable.");