| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 } | 335 } |
| 336 | 336 |
| 337 ui::MouseEvent mouseev(xev); | 337 ui::MouseEvent mouseev(xev); |
| 338 TranslateAndDispatchLocatedEvent(&mouseev); | 338 TranslateAndDispatchLocatedEvent(&mouseev); |
| 339 break; | 339 break; |
| 340 } | 340 } |
| 341 } | 341 } |
| 342 return ui::POST_DISPATCH_STOP_PROPAGATION; | 342 return ui::POST_DISPATCH_STOP_PROPAGATION; |
| 343 } | 343 } |
| 344 | 344 |
| 345 ui::EventSource* WindowTreeHostX11::GetEventSource() { |
| 346 return this; |
| 347 } |
| 348 |
| 345 gfx::AcceleratedWidget WindowTreeHostX11::GetAcceleratedWidget() { | 349 gfx::AcceleratedWidget WindowTreeHostX11::GetAcceleratedWidget() { |
| 346 return xwindow_; | 350 return xwindow_; |
| 347 } | 351 } |
| 348 | 352 |
| 349 void WindowTreeHostX11::Show() { | 353 void WindowTreeHostX11::Show() { |
| 350 if (!window_mapped_) { | 354 if (!window_mapped_) { |
| 351 // Before we map the window, set size hints. Otherwise, some window managers | 355 // Before we map the window, set size hints. Otherwise, some window managers |
| 352 // will ignore toplevel XMoveWindow commands. | 356 // will ignore toplevel XMoveWindow commands. |
| 353 XSizeHints size_hints; | 357 XSizeHints size_hints; |
| 354 size_hints.flags = PPosition | PWinGravity; | 358 size_hints.flags = PPosition | PWinGravity; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 } | 626 } |
| 623 | 627 |
| 624 namespace test { | 628 namespace test { |
| 625 | 629 |
| 626 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 630 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
| 627 default_override_redirect = override_redirect; | 631 default_override_redirect = override_redirect; |
| 628 } | 632 } |
| 629 | 633 |
| 630 } // namespace test | 634 } // namespace test |
| 631 } // namespace aura | 635 } // namespace aura |
| OLD | NEW |