| 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/root_window_host_x11.h" | 5 #include "ui/aura/root_window_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/Xfixes.h> | 9 #include <X11/extensions/Xfixes.h> |
| 10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 size_t insert_index_; | 356 size_t insert_index_; |
| 357 | 357 |
| 358 DISALLOW_COPY_AND_ASSIGN(MouseMoveFilter); | 358 DISALLOW_COPY_AND_ASSIGN(MouseMoveFilter); |
| 359 }; | 359 }; |
| 360 | 360 |
| 361 //////////////////////////////////////////////////////////////////////////////// | 361 //////////////////////////////////////////////////////////////////////////////// |
| 362 // RootWindowHostX11 | 362 // RootWindowHostX11 |
| 363 | 363 |
| 364 RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds) | 364 RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds) |
| 365 : delegate_(NULL), | 365 : delegate_(NULL), |
| 366 xdisplay_(ui::GetXDisplay()), | 366 xdisplay_(base::MessagePumpX11::GetDefaultXDisplay()), |
| 367 xwindow_(0), | 367 xwindow_(0), |
| 368 x_root_window_(DefaultRootWindow(xdisplay_)), | 368 x_root_window_(DefaultRootWindow(xdisplay_)), |
| 369 current_cursor_(ui::kCursorNull), | 369 current_cursor_(ui::kCursorNull), |
| 370 window_mapped_(false), | 370 window_mapped_(false), |
| 371 bounds_(bounds), | 371 bounds_(bounds), |
| 372 is_internal_display_(false), | 372 is_internal_display_(false), |
| 373 focus_when_shown_(false), | 373 focus_when_shown_(false), |
| 374 touch_calibrate_(new internal::TouchEventCalibrate), | 374 touch_calibrate_(new internal::TouchEventCalibrate), |
| 375 mouse_move_filter_(new MouseMoveFilter), | 375 mouse_move_filter_(new MouseMoveFilter), |
| 376 atom_cache_(xdisplay_, kAtomsToCache), | 376 atom_cache_(xdisplay_, kAtomsToCache), |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 #endif | 1083 #endif |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 // static | 1086 // static |
| 1087 RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) { | 1087 RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) { |
| 1088 return new RootWindowHostX11(bounds); | 1088 return new RootWindowHostX11(bounds); |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 // static | 1091 // static |
| 1092 gfx::Size RootWindowHost::GetNativeScreenSize() { | 1092 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 1093 ::Display* xdisplay = ui::GetXDisplay(); | 1093 ::Display* xdisplay = base::MessagePumpX11::GetDefaultXDisplay(); |
| 1094 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 1094 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 namespace test { | 1097 namespace test { |
| 1098 | 1098 |
| 1099 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 1099 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
| 1100 default_override_redirect = override_redirect; | 1100 default_override_redirect = override_redirect; |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 } // namespace test | 1103 } // namespace test |
| 1104 } // namespace aura | 1104 } // namespace aura |
| OLD | NEW |