Bug 1433863 - Use client titlebar decorations on GNOME Flashback (former fallback) DE, r?jhorak
Also comment existing entries at nsWindow::GetCSDSupportLevel().
MozReview-Commit-ID: 1YzZhv7WrQj
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -6859,34 +6859,41 @@ nsWindow::DoDrawTitlebar() const
nsWindow::CSDSupportLevel
nsWindow::GetCSDSupportLevel() {
if (sCSDSupportLevel != CSD_SUPPORT_UNKNOWN) {
return sCSDSupportLevel;
}
const char* currentDesktop = getenv("XDG_CURRENT_DESKTOP");
if (currentDesktop) {
- if (strstr(currentDesktop, "GNOME") != nullptr) {
+ // GNOME Flashback (fallback)
+ if (strstr(currentDesktop, "GNOME-Flashback:GNOME") != nullptr) {
+ sCSDSupportLevel = CSD_SUPPORT_FLAT;
+ // gnome-shell
+ } else if (strstr(currentDesktop, "GNOME") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FULL;
} else if (strstr(currentDesktop, "XFCE") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FLAT;
} else if (strstr(currentDesktop, "X-Cinnamon") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FULL;
+ // KDE Plasma
} else if (strstr(currentDesktop, "KDE") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FLAT;
} else if (strstr(currentDesktop, "LXDE") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FLAT;
} else if (strstr(currentDesktop, "openbox") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FLAT;
} else if (strstr(currentDesktop, "i3") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_NONE;
} else if (strstr(currentDesktop, "MATE") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FLAT;
+ // Ubuntu Unity
} else if (strstr(currentDesktop, "Unity") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FLAT;
+ // Elementary OS
} else if (strstr(currentDesktop, "Pantheon") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FULL;
} else if (strstr(currentDesktop, "LXQt") != nullptr) {
sCSDSupportLevel = CSD_SUPPORT_FULL;
} else {
// Release or beta builds are not supposed to be broken
// so disable titlebar rendering on untested/unknown systems.
#if defined(RELEASE_OR_BETA)