summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--old-configure.in17
-rw-r--r--toolkit/modules/AppConstants.jsm2
-rw-r--r--toolkit/modules/LightweightThemeConsumer.jsm2
-rw-r--r--toolkit/modules/moz.build3
4 files changed, 19 insertions, 5 deletions
diff --git a/old-configure.in b/old-configure.in
index 86cf2ae181..f1ee5d368a 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -2167,6 +2167,7 @@ MOZ_LDAP_XPCOM=
MOZ_MORK=
MOZ_MAPI_SUPPORT=
MOZ_INCOMPLETE_EXTERNAL_LINKAGE=
+MOZ_CAN_DRAW_IN_TITLEBAR=
case "$target_os" in
mingw*)
@@ -2816,6 +2817,22 @@ fi
AC_SUBST(MOZ_MAPI_SUPPORT)
dnl ========================================================
+dnl = Client drawing in titlebar
+dnl ========================================================
+if test -n "$MOZ_CAN_DRAW_IN_TITLEBAR"; then
+ case "$OS_TARGET" in
+ WINNT|Darwin)
+ AC_DEFINE(MOZ_CAN_DRAW_IN_TITLEBAR)
+ ;;
+ *)
+ AC_MSG_ERROR([Drawing in the titlebar is only supported on Windows and Macintosh targets])
+ ;;
+ esac
+fi
+
+AC_SUBST(MOZ_CAN_DRAW_IN_TITLEBAR)
+
+dnl ========================================================
dnl = Enable WebRTC code
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(webrtc,
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index 41b398efc1..40aaadbf07 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 325f711b78..4010a9ff22 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 8a364df8c2..54adae4cf6 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