Bug 1410894 - Load CSD config from nsLookAndFeel, r=jhorak

Make CSD setup and titlebar drawing available when users enable it by preference and also it's available on running system.

MozReview-Commit-ID: 4BLgzVWwX1R

--HG--
extra : rebase_source : 15293821b9962bd9d0ee22331e7fad9027a47a7a
This commit is contained in:
Martin Stransky 2017-10-23 21:28:47 +02:00
parent 6a4c5abeaf
commit c2b677a91d

View File

@ -3757,6 +3757,15 @@ nsWindow::Create(nsIWidget* aParent,
GtkWindowGroup *group = gtk_window_group_new();
gtk_window_group_add_window(group, GTK_WINDOW(mShell));
g_object_unref(group);
if (GetCSDSupportLevel() != CSD_SUPPORT_NONE) {
int32_t isCSDAvailable = false;
nsresult rv = LookAndFeel::GetInt(LookAndFeel::eIntID_GTKCSDAvailable,
&isCSDAvailable);
if (NS_SUCCEEDED(rv)) {
mIsCSDAvailable = isCSDAvailable;
}
}
}
// Create a container to hold child windows and child GtkWidgets.