Bug 1827137 - Allow overriding CSD support with GTK_CSD=0, so that gtk3-nocsd keeps working. r=stransky

I don't think there's a particularly nicer/easier way of doing this,
wdyt?

Differential Revision: https://phabricator.services.mozilla.com/D175061
This commit is contained in:
Emilio Cobos Álvarez 2023-04-11 10:43:44 +00:00
Родитель 7860a3d055
Коммит 141fa8957a
1 изменённых файлов: 2 добавлений и 3 удалений

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

@ -9323,9 +9323,8 @@ 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.
const char* csdOverride = getenv("GTK_CSD");
if (csdOverride && *csdOverride == '1') {
return GTK_DECORATION_CLIENT;
if (const char* csdOverride = getenv("GTK_CSD")) {
return *csdOverride == '0' ? GTK_DECORATION_NONE : GTK_DECORATION_CLIENT;
}
// TODO: Consider switching this to GetDesktopEnvironmentIdentifier().