OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |