Bug 1693460 [Linux] Always check GTK_CSD variable and use client decorations on Elementary OS, r=jhorak

Differential Revision: https://phabricator.services.mozilla.com/D107253
This commit is contained in:
stransky 2021-03-05 13:27:14 +00:00
Родитель f95c55540b
Коммит 7ae7603cfa
1 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -8171,12 +8171,10 @@ nsWindow::GtkWindowDecoration nsWindow::GetSystemGtkWindowDecoration() {
// GTK_CSD forces CSD mode - use also CSD because window manager
// decorations does not work with CSD.
// We check GTK_CSD as well as gtk_window_should_use_csd() does.
if (sGtkWindowDecoration == GTK_DECORATION_SYSTEM) {
const char* csdOverride = getenv("GTK_CSD");
if (csdOverride && atoi(csdOverride)) {
sGtkWindowDecoration = GTK_DECORATION_CLIENT;
return sGtkWindowDecoration;
}
const char* csdOverride = getenv("GTK_CSD");
if (csdOverride && atoi(csdOverride)) {
sGtkWindowDecoration = GTK_DECORATION_CLIENT;
return sGtkWindowDecoration;
}
const char* currentDesktop = getenv("XDG_CURRENT_DESKTOP");
@ -8212,7 +8210,7 @@ nsWindow::GtkWindowDecoration nsWindow::GetSystemGtkWindowDecoration() {
sGtkWindowDecoration = GTK_DECORATION_SYSTEM;
// Elementary OS
} else if (strstr(currentDesktop, "Pantheon") != nullptr) {
sGtkWindowDecoration = GTK_DECORATION_SYSTEM;
sGtkWindowDecoration = GTK_DECORATION_CLIENT;
} else if (strstr(currentDesktop, "LXQt") != nullptr) {
sGtkWindowDecoration = GTK_DECORATION_SYSTEM;
} else if (strstr(currentDesktop, "Deepin") != nullptr) {