1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
diff --git a/browser/base/moz.build b/browser/base/moz.build
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -55,15 +55,15 @@ BROWSER_CHROME_MANIFESTS += [
DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
DEFINES['MOZ_APP_VERSION_DISPLAY'] = CONFIG['MOZ_APP_VERSION_DISPLAY']
DEFINES['APP_LICENSE_BLOCK'] = '%s/content/overrides/app-license.html' % SRCDIR
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3', 'cocoa'):
DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3'):
DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1
JAR_MANIFESTS += ['jar.mn']
diff --git a/toolkit/modules/moz.build b/toolkit/modules/moz.build
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -260,17 +260,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
EXTRA_JS_MODULES.third_party.jsesc += ['third_party/jsesc/jsesc.js']
EXTRA_JS_MODULES.sessionstore += [
'sessionstore/PrivacyLevel.jsm',
'sessionstore/SessionHistory.jsm',
'sessionstore/Utils.jsm',
]
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa', 'gtk3'):
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3'):
DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -6852,72 +6852,19 @@ nsWindow::DoDrawTitlebar() const
return mIsCSDEnabled && mSizeState == nsSizeMode_Normal;
}
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) {
- 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;
- } 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;
- } else if (strstr(currentDesktop, "Unity") != nullptr) {
- sCSDSupportLevel = CSD_SUPPORT_FLAT;
- } 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)
- sCSDSupportLevel = CSD_SUPPORT_NONE;
-#else
- sCSDSupportLevel = CSD_SUPPORT_FLAT;
-#endif
- }
- } else {
- sCSDSupportLevel = CSD_SUPPORT_NONE;
- }
-
- // We don't support CSD_SUPPORT_FULL on Wayland
- if (!GDK_IS_X11_DISPLAY(gdk_display_get_default()) &&
- sCSDSupportLevel == CSD_SUPPORT_FULL) {
- sCSDSupportLevel = CSD_SUPPORT_FLAT;
- }
-
- // Allow MOZ_GTK_TITLEBAR_DECORATION to override our heuristics
- const char* decorationOverride = getenv("MOZ_GTK_TITLEBAR_DECORATION");
- if (decorationOverride) {
- if (strcmp(decorationOverride, "none") == 0) {
- sCSDSupportLevel = CSD_SUPPORT_NONE;
- } else if (strcmp(decorationOverride, "client") == 0) {
- sCSDSupportLevel = CSD_SUPPORT_FLAT;
- } else if (strcmp(decorationOverride, "system") == 0) {
- sCSDSupportLevel = CSD_SUPPORT_FULL;
- }
- }
-
+
+ // Disabled due to Bug 1440461
+ sCSDSupportLevel = CSD_SUPPORT_NONE;
return sCSDSupportLevel;
}
int32_t
nsWindow::RoundsWidgetCoordinatesTo()
{
return GdkScaleFactor();
}
|