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

Unified Diff: ui/views/widget/desktop_aura/x11_window_event_filter.cc

Issue 2914103002: Remove usages of XInternAtom (Closed)
Patch Set: Address sadrul and sergeyu comments Created 3 years, 7 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/views/widget/desktop_aura/x11_window_event_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/x11_window_event_filter.cc
diff --git a/ui/views/widget/desktop_aura/x11_window_event_filter.cc b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
index 5e4721c988e12a4a804a988f39ce176725ea3aea..b1bee28b953ae728d7d9c7edf56678312b4b689d 100644
--- a/ui/views/widget/desktop_aura/x11_window_event_filter.cc
+++ b/ui/views/widget/desktop_aura/x11_window_event_filter.cc
@@ -15,6 +15,7 @@
#include "ui/aura/window_delegate.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/hit_test.h"
+#include "ui/base/x/x11_util.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/events/event.h"
@@ -39,11 +40,6 @@ const int k_NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT = 6;
const int k_NET_WM_MOVERESIZE_SIZE_LEFT = 7;
const int k_NET_WM_MOVERESIZE_MOVE = 8;
-const char* kAtomsToCache[] = {
- "_NET_WM_MOVERESIZE",
- NULL
-};
-
} // namespace
namespace views {
@@ -53,7 +49,6 @@ X11WindowEventFilter::X11WindowEventFilter(
: xdisplay_(gfx::GetXDisplay()),
xwindow_(window_tree_host->AsWindowTreeHost()->GetAcceleratedWidget()),
x_root_window_(DefaultRootWindow(xdisplay_)),
- atom_cache_(xdisplay_, kAtomsToCache),
window_tree_host_(window_tree_host),
click_component_(HTNOWHERE) {
}
@@ -225,7 +220,7 @@ bool X11WindowEventFilter::DispatchHostWindowDragMovement(
event.xclient.type = ClientMessage;
event.xclient.display = xdisplay_;
event.xclient.window = xwindow_;
- event.xclient.message_type = atom_cache_.GetAtom("_NET_WM_MOVERESIZE");
+ event.xclient.message_type = ui::GetAtom("_NET_WM_MOVERESIZE");
event.xclient.format = 32;
event.xclient.data.l[0] = screen_location.x();
event.xclient.data.l[1] = screen_location.y();
« no previous file with comments | « ui/views/widget/desktop_aura/x11_window_event_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698