| Index: ui/platform_window/x11/x11_window_base.cc
|
| diff --git a/ui/platform_window/x11/x11_window_base.cc b/ui/platform_window/x11/x11_window_base.cc
|
| index 61d555db80d4a008f156e75685cfc93dfed26242..4e8de812ae6b57c9d45559f86924973bb90b0f46 100644
|
| --- a/ui/platform_window/x11/x11_window_base.cc
|
| +++ b/ui/platform_window/x11/x11_window_base.cc
|
| @@ -13,7 +13,6 @@
|
|
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "ui/base/platform_window_defaults.h"
|
| -#include "ui/base/x/x11_util.h"
|
| #include "ui/base/x/x11_window_event_manager.h"
|
| #include "ui/events/devices/x11/touch_factory_x11.h"
|
| #include "ui/events/event.h"
|
| @@ -22,6 +21,7 @@
|
| #include "ui/events/platform/platform_event_source.h"
|
| #include "ui/events/platform/x11/x11_event_source.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| +#include "ui/gfx/x/x11_atom_cache.h"
|
| #include "ui/platform_window/platform_window_delegate.h"
|
|
|
| namespace ui {
|
| @@ -113,8 +113,8 @@ void X11WindowBase::Create() {
|
| XFlush(xdisplay_);
|
|
|
| ::Atom protocols[2];
|
| - protocols[0] = GetAtom("WM_DELETE_WINDOW");
|
| - protocols[1] = GetAtom("_NET_WM_PING");
|
| + protocols[0] = gfx::GetAtom("WM_DELETE_WINDOW");
|
| + protocols[1] = gfx::GetAtom("_NET_WM_PING");
|
| XSetWMProtocols(xdisplay_, xwindow_, protocols, 2);
|
|
|
| // We need a WM_CLIENT_MACHINE and WM_LOCALE_NAME value so we integrate with
|
| @@ -127,8 +127,9 @@ void X11WindowBase::Create() {
|
| static_assert(sizeof(long) >= sizeof(pid_t),
|
| "pid_t should not be larger than long");
|
| long pid = getpid();
|
| - XChangeProperty(xdisplay_, xwindow_, GetAtom("_NET_WM_PID"), XA_CARDINAL, 32,
|
| - PropModeReplace, reinterpret_cast<unsigned char*>(&pid), 1);
|
| + XChangeProperty(xdisplay_, xwindow_, gfx::GetAtom("_NET_WM_PID"), XA_CARDINAL,
|
| + 32, PropModeReplace, reinterpret_cast<unsigned char*>(&pid),
|
| + 1);
|
| // Before we map the window, set size hints. Otherwise, some window managers
|
| // will ignore toplevel XMoveWindow commands.
|
| XSizeHints size_hints;
|
| @@ -214,8 +215,8 @@ void X11WindowBase::SetTitle(const base::string16& title) {
|
| return;
|
| window_title_ = title;
|
| std::string utf8str = base::UTF16ToUTF8(title);
|
| - XChangeProperty(xdisplay_, xwindow_, GetAtom("_NET_WM_NAME"),
|
| - GetAtom("UTF8_STRING"), 8, PropModeReplace,
|
| + XChangeProperty(xdisplay_, xwindow_, gfx::GetAtom("_NET_WM_NAME"),
|
| + gfx::GetAtom("UTF8_STRING"), 8, PropModeReplace,
|
| reinterpret_cast<const unsigned char*>(utf8str.c_str()),
|
| utf8str.size());
|
| XTextProperty xtp;
|
| @@ -293,9 +294,9 @@ void X11WindowBase::ProcessXWindowEvent(XEvent* xev) {
|
|
|
| case ClientMessage: {
|
| Atom message = static_cast<Atom>(xev->xclient.data.l[0]);
|
| - if (message == GetAtom("WM_DELETE_WINDOW")) {
|
| + if (message == gfx::GetAtom("WM_DELETE_WINDOW")) {
|
| delegate_->OnCloseRequest();
|
| - } else if (message == GetAtom("_NET_WM_PING")) {
|
| + } else if (message == gfx::GetAtom("_NET_WM_PING")) {
|
| XEvent reply_event = *xev;
|
| reply_event.xclient.window = xroot_window_;
|
|
|
|
|