Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4068)

Unified Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 174223004: linux_aura: Default to system titlebars under some window managers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.h ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/browser_window_gtk.cc
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index 5f20f14e781b282c242d33b220d13f12f5401f29..cb1ceaf6c809434c61f1d29aad6677b8bd334418 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -1528,7 +1528,7 @@ void BrowserWindowGtk::RegisterProfilePrefs(
// Avoid checking the window manager if we're not connected to an X server (as
// is the case in Valgrind tests).
if (ui::XDisplayExists())
- custom_frame_default = GetCustomFramePrefDefault();
+ custom_frame_default = ui::GetCustomFramePrefDefault();
registry->RegisterBooleanPref(
prefs::kUseCustomChromeFrame,
@@ -2355,27 +2355,6 @@ void BrowserWindowGtk::OnUseCustomChromeFrameChanged() {
}
// static
-bool BrowserWindowGtk::GetCustomFramePrefDefault() {
- // Ideally, we'd use the custom frame by default and just fall back on using
- // system decorations for the few (?) tiling window managers where the custom
- // frame doesn't make sense (e.g. awesome, ion3, ratpoison, xmonad, etc.) or
- // other WMs where it has issues (e.g. Fluxbox -- see issue 19130). The EWMH
- // _NET_SUPPORTING_WM property makes it easy to look up a name for the current
- // WM, but at least some of the WMs in the latter group don't set it.
- // Instead, we default to using system decorations for all WMs and
- // special-case the ones where the custom frame should be used.
- ui::WindowManagerName wm_type = ui::GuessWindowManager();
- return (wm_type == ui::WM_BLACKBOX ||
- wm_type == ui::WM_COMPIZ ||
- wm_type == ui::WM_ENLIGHTENMENT ||
- wm_type == ui::WM_METACITY ||
- wm_type == ui::WM_MUFFIN ||
- wm_type == ui::WM_MUTTER ||
- wm_type == ui::WM_OPENBOX ||
- wm_type == ui::WM_XFWM4);
-}
-
-// static
BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
browser_window_gtk->Init();
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.h ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698