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

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

Issue 10889038: Linux: Use GConfTitlebarListener on Unity or when the WM is Metacity. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gconf_titlebar_listener.cc
===================================================================
--- chrome/browser/ui/gtk/gconf_titlebar_listener.cc (revision 153936)
+++ chrome/browser/ui/gtk/gconf_titlebar_listener.cc (working copy)
@@ -11,6 +11,7 @@
#include "base/memory/singleton.h"
#include "base/nix/xdg_util.h"
#include "chrome/browser/ui/gtk/browser_titlebar.h"
+#include "ui/base/x/x11_util.h"
namespace {
@@ -52,8 +53,11 @@
GConfTitlebarListener::GConfTitlebarListener() : client_(NULL) {
scoped_ptr<base::Environment> env(base::Environment::Create());
- if (base::nix::GetDesktopEnvironment(env.get()) ==
- base::nix::DESKTOP_ENVIRONMENT_GNOME) {
+ base::nix::DesktopEnvironment de =
+ base::nix::GetDesktopEnvironment(env.get());
+ if (de == base::nix::DESKTOP_ENVIRONMENT_GNOME ||
+ de == base::nix::DESKTOP_ENVIRONMENT_UNITY ||
+ ui::GuessWindowManager() == ui::WM_METACITY) {
client_ = gconf_client_get_default();
// If we fail to get a context, that's OK, since we'll just fallback on
// not receiving gconf keys.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698