summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-14 19:16:07 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-14 19:16:07 -0400
commit6f6d1f6ff788b6fac2a137ecbd41762f9976f42d (patch)
tree7309b15e219391b049af30bf2770a9aedf0bde28 /toolkit
parentf1675650abc31da01f7731a143d0659dbff31cfc (diff)
downloadUXP-6f6d1f6ff788b6fac2a137ecbd41762f9976f42d.tar
UXP-6f6d1f6ff788b6fac2a137ecbd41762f9976f42d.tar.gz
UXP-6f6d1f6ff788b6fac2a137ecbd41762f9976f42d.tar.lz
UXP-6f6d1f6ff788b6fac2a137ecbd41762f9976f42d.tar.xz
UXP-6f6d1f6ff788b6fac2a137ecbd41762f9976f42d.zip
Issue #1516 - Part 1: Add a global build define to determine if the client can draw in the titlebar and update consumers of the local define
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/modules/AppConstants.jsm2
-rw-r--r--toolkit/modules/LightweightThemeConsumer.jsm2
-rw-r--r--toolkit/modules/moz.build3
3 files changed, 2 insertions, 5 deletions
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index 41b398efc..40aaadbf0 100644
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -209,7 +209,7 @@ MOZ_SAFE_BROWSING:
#endif
CAN_DRAW_IN_TITLEBAR:
-#ifdef CAN_DRAW_IN_TITLEBAR
+#ifdef MOZ_CAN_DRAW_IN_TITLEBAR
true,
#else
false,
diff --git a/toolkit/modules/LightweightThemeConsumer.jsm b/toolkit/modules/LightweightThemeConsumer.jsm
index 325f711b7..4010a9ff2 100644
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -147,7 +147,7 @@ LightweightThemeConsumer.prototype = {
footer.removeAttribute("lwthemefooter");
}
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX) && defined(MOZ_CAN_DRAW_IN_TITLEBAR)
// On OS X, we extend the lightweight theme into the titlebar, which means setting
// the chromemargin attribute. Some XUL applications already draw in the titlebar,
// so we need to save the chromemargin value before we overwrite it with the value
diff --git a/toolkit/modules/moz.build b/toolkit/modules/moz.build
index 8a364df8c..54adae4cf 100644
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -92,9 +92,6 @@ EXTRA_PP_JS_MODULES += [
'WindowDraggingUtils.jsm',
]
-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
- DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
-
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'):
DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1