Bug 1414216 - Disable tabsintitlebar when disabled by -moz-gtk-csd-available media feature, r?Gijs
MozReview-Commit-ID: G9NHhuFwUEe
--- a/browser/base/content/browser-tabsintitlebar.js
+++ b/browser/base/content/browser-tabsintitlebar.js
@@ -9,16 +9,21 @@
var TabsInTitlebar = {
init() {
if (this._initialized) {
return;
}
this._readPref();
Services.prefs.addObserver(this._prefName, this);
+ // Always disable on unsupported GTK versions.
+ if (AppConstants.MOZ_WIDGET_TOOLKIT == "gtk3") {
+ this.allowedBy("gtk", window.matchMedia("(-moz-gtk-csd-available)"));
+ }
+
// We need to update the appearance of the titlebar when the menu changes
// from the active to the inactive state. We can't, however, rely on
// DOMMenuBarInactive, because the menu fires this event and then removes
// the inactive attribute after an event-loop spin.
//
// Because updating the appearance involves sampling the heights and margins
// of various elements, it's important that the layout be more or less
// settled before updating the titlebar. So instead of listening to