| Index: ui/aura/root_window_host_linux.cc
|
| diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
|
| index 1691043791d372f69af0cf6493c38695ec39fe1f..c33ccebf402ba84dc785bd85a715dcd8575ece9f 100644
|
| --- a/ui/aura/root_window_host_linux.cc
|
| +++ b/ui/aura/root_window_host_linux.cc
|
| @@ -13,7 +13,7 @@
|
| #include <X11/extensions/Xrandr.h>
|
| #include <algorithm>
|
|
|
| -#include "base/message_pump_x.h"
|
| +#include "base/message_pump_aurax11.h"
|
| #include "base/stl_util.h"
|
| #include "base/stringprintf.h"
|
| #include "grit/ui_resources_standard.h"
|
| @@ -23,7 +23,6 @@
|
| #include "ui/aura/env.h"
|
| #include "ui/aura/event.h"
|
| #include "ui/aura/root_window.h"
|
| -#include "ui/aura/x11_atom_cache.h"
|
| #include "ui/base/cursor/cursor.h"
|
| #include "ui/base/keycodes/keyboard_codes.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| @@ -35,6 +34,7 @@
|
| #include "ui/gfx/image/image.h"
|
| #include "ui/gfx/image/image_skia.h"
|
|
|
| +using base::MessagePumpAuraX11;
|
| using std::max;
|
| using std::min;
|
|
|
| @@ -385,7 +385,7 @@ class RootWindowHostLinux::ImageCursors {
|
|
|
| RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds)
|
| : root_window_(NULL),
|
| - xdisplay_(base::MessagePumpX::GetDefaultXDisplay()),
|
| + xdisplay_(base::MessagePumpAuraX11::GetDefaultXDisplay()),
|
| xwindow_(0),
|
| x_root_window_(DefaultRootWindow(xdisplay_)),
|
| current_cursor_(ui::kCursorNull),
|
| @@ -439,10 +439,9 @@ RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds)
|
| // TODO(erg): We currently only request window deletion events. We also
|
| // should listen for activation events and anything else that GTK+ listens
|
| // for, and do something useful.
|
| - X11AtomCache* cache = aura::Env::GetInstance()->atom_cache();
|
| ::Atom protocols[2];
|
| - protocols[0] = cache->GetAtom(ATOM_WM_DELETE_WINDOW);
|
| - protocols[1] = cache->GetAtom(ATOM__NET_WM_PING);
|
| + protocols[0] = MessagePumpAuraX11::GetAtom(base::atom::WM_DELETE_WINDOW);
|
| + protocols[1] = MessagePumpAuraX11::GetAtom(base::atom::_NET_WM_PING);
|
| XSetWMProtocols(xdisplay_, xwindow_, protocols, 2);
|
|
|
| // We need a WM_CLIENT_MACHINE and WM_LOCALE_NAME value so we integrate with
|
| @@ -454,7 +453,7 @@ RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds)
|
| pid_t pid = getpid();
|
| XChangeProperty(xdisplay_,
|
| xwindow_,
|
| - cache->GetAtom(ATOM__NET_WM_PID),
|
| + MessagePumpAuraX11::GetAtom(base::atom::_NET_WM_PID),
|
| XA_CARDINAL,
|
| 32,
|
| PropModeReplace,
|
| @@ -626,11 +625,12 @@ bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) {
|
| }
|
| case ClientMessage: {
|
| Atom message_type = static_cast<Atom>(xev->xclient.data.l[0]);
|
| - X11AtomCache* cache = aura::Env::GetInstance()->atom_cache();
|
| - if (message_type == cache->GetAtom(ATOM_WM_DELETE_WINDOW)) {
|
| + if (message_type == MessagePumpAuraX11::GetAtom(
|
| + base::atom::WM_DELETE_WINDOW)) {
|
| // We have received a close message from the window manager.
|
| root_window_->OnRootWindowHostClosed();
|
| - } else if (message_type == cache->GetAtom(ATOM__NET_WM_PING)) {
|
| + } else if (message_type == MessagePumpAuraX11::GetAtom(
|
| + base::atom::_NET_WM_PING)) {
|
| XEvent reply_event = *xev;
|
| reply_event.xclient.window = x_root_window_;
|
|
|
| @@ -930,7 +930,7 @@ bool RootWindowHostLinux::IsWindowManagerPresent() {
|
| // of WM_Sn selections (where n is a screen number).
|
| return XGetSelectionOwner(
|
| xdisplay_,
|
| - aura::Env::GetInstance()->atom_cache()->GetAtom(ATOM_WM_S0)) != None;
|
| + MessagePumpAuraX11::GetAtom(base::atom::WM_S0)) != None;
|
| }
|
|
|
| void RootWindowHostLinux::SetCursorInternal(gfx::NativeCursor cursor) {
|
| @@ -957,7 +957,7 @@ RootWindowHost* RootWindowHost::GetForAcceleratedWidget(
|
|
|
| // static
|
| gfx::Size RootWindowHost::GetNativeScreenSize() {
|
| - ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay();
|
| + ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay();
|
| return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
|
| }
|
|
|
|
|