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

Side by Side Diff: ui/aura/window_tree_host_x11.cc

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. 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 unified diff | Download patch
« no previous file with comments | « ui/aura/window_tree_host_platform.cc ('k') | ui/base/cursor/cursor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/window_tree_host_x11.h" 5 #include "ui/aura/window_tree_host_x11.h"
6 6
7 #include <strings.h> 7 #include <strings.h>
8 #include <X11/cursorfont.h> 8 #include <X11/cursorfont.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <X11/extensions/Xrandr.h> 10 #include <X11/extensions/Xrandr.h>
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 } // namespace 114 } // namespace
115 115
116 //////////////////////////////////////////////////////////////////////////////// 116 ////////////////////////////////////////////////////////////////////////////////
117 // WindowTreeHostX11 117 // WindowTreeHostX11
118 118
119 WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds) 119 WindowTreeHostX11::WindowTreeHostX11(const gfx::Rect& bounds)
120 : xdisplay_(gfx::GetXDisplay()), 120 : xdisplay_(gfx::GetXDisplay()),
121 xwindow_(0), 121 xwindow_(0),
122 x_root_window_(DefaultRootWindow(xdisplay_)), 122 x_root_window_(DefaultRootWindow(xdisplay_)),
123 current_cursor_(ui::kCursorNull), 123 current_cursor_(ui::CursorType::kNull),
124 window_mapped_(false), 124 window_mapped_(false),
125 bounds_(bounds), 125 bounds_(bounds),
126 atom_cache_(xdisplay_, kAtomsToCache) { 126 atom_cache_(xdisplay_, kAtomsToCache) {
127 XSetWindowAttributes swa; 127 XSetWindowAttributes swa;
128 memset(&swa, 0, sizeof(swa)); 128 memset(&swa, 0, sizeof(swa));
129 swa.background_pixmap = None; 129 swa.background_pixmap = None;
130 swa.bit_gravity = NorthWestGravity; 130 swa.bit_gravity = NorthWestGravity;
131 swa.override_redirect = ui::UseTestConfigForPlatformWindows(); 131 swa.override_redirect = ui::UseTestConfigForPlatformWindows();
132 xwindow_ = XCreateWindow( 132 xwindow_ = XCreateWindow(
133 xdisplay_, x_root_window_, 133 xdisplay_, x_root_window_,
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 ui::LocatedEvent* event) { 567 ui::LocatedEvent* event) {
568 SendEventToSink(event); 568 SendEventToSink(event);
569 } 569 }
570 570
571 // static 571 // static
572 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds_in_pixels) { 572 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds_in_pixels) {
573 return new WindowTreeHostX11(bounds_in_pixels); 573 return new WindowTreeHostX11(bounds_in_pixels);
574 } 574 }
575 575
576 } // namespace aura 576 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_platform.cc ('k') | ui/base/cursor/cursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698