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

Unified Diff: ui/base/x/x11_util.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 | « ui/base/x/x11_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/x11_util.cc
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index b914ef0e99d171176ea735453333049f3ffd2833..12fe06c5af5723d835b99435f3bc7b31bfd01b63 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -1011,6 +1011,26 @@ XID GetHighestAncestorWindow(XID window, XID root) {
}
}
+bool 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 = GuessWindowManager();
+ return (wm_type == WM_BLACKBOX ||
+ wm_type == WM_COMPIZ ||
+ wm_type == WM_ENLIGHTENMENT ||
+ wm_type == WM_METACITY ||
+ wm_type == WM_MUFFIN ||
+ wm_type == WM_MUTTER ||
+ wm_type == WM_OPENBOX ||
+ wm_type == WM_XFWM4);
+}
+
bool GetWindowDesktop(XID window, int* desktop) {
return GetIntProperty(window, "_NET_WM_DESKTOP", desktop);
}
« no previous file with comments | « ui/base/x/x11_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698