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

Unified Diff: ui/views/widget/desktop_aura/desktop_screen_x11.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
Index: ui/views/widget/desktop_aura/desktop_screen_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
index 3432afe40d033984d5c898b9b395a38253eff235..17145e383fbf2d46be90e37fc23d06c332a9c545 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
@@ -35,11 +35,6 @@
namespace {
-const char* const kAtomsToCache[] = {
- "_NET_WORKAREA",
- nullptr
-};
-
// The delay to perform configuration after RRNotify. See the comment
// in |Dispatch()|.
const int64_t kConfigureDelayMs = 500;
@@ -94,8 +89,7 @@ DesktopScreenX11::DesktopScreenX11()
x_root_window_(DefaultRootWindow(xdisplay_)),
has_xrandr_(false),
xrandr_event_base_(0),
- primary_display_index_(0),
- atom_cache_(xdisplay_, kAtomsToCache) {
+ primary_display_index_(0) {
// We only support 1.3+. There were library changes before this and we should
// use the new interface instead of the 1.2 one.
int randr_version_major = 0;
@@ -241,7 +235,7 @@ bool DesktopScreenX11::CanDispatchEvent(const ui::PlatformEvent& event) {
event->type - xrandr_event_base_ == RRNotify ||
(event->type == PropertyNotify &&
event->xproperty.window == x_root_window_ &&
- event->xproperty.atom == atom_cache_.GetAtom("_NET_WORKAREA"));
+ event->xproperty.atom == ui::GetAtom("_NET_WORKAREA"));
}
uint32_t DesktopScreenX11::DispatchEvent(const ui::PlatformEvent& event) {
@@ -250,7 +244,7 @@ uint32_t DesktopScreenX11::DispatchEvent(const ui::PlatformEvent& event) {
XRRUpdateConfiguration(event);
} else if (event->type - xrandr_event_base_ == RRNotify ||
(event->type == PropertyNotify &&
- event->xproperty.atom == atom_cache_.GetAtom("_NET_WORKAREA"))) {
+ event->xproperty.atom == ui::GetAtom("_NET_WORKAREA"))) {
// There's some sort of observer dispatch going on here, but I don't think
// it's the screen's?
if (configure_timer_.get() && configure_timer_->IsRunning()) {
@@ -287,8 +281,7 @@ DesktopScreenX11::DesktopScreenX11(
has_xrandr_(false),
xrandr_event_base_(0),
displays_(test_displays),
- primary_display_index_(0),
- atom_cache_(xdisplay_, kAtomsToCache) {}
+ primary_display_index_(0) {}
std::vector<display::Display> DesktopScreenX11::BuildDisplaysFromXRandRInfo() {
std::vector<display::Display> displays;
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698