| 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/views/widget/desktop_aura/x11_whole_screen_move_loop.h" | 5 #include "ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <X11/keysym.h> | 8 #include <X11/keysym.h> |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 16 #include "ui/aura/client/capture_client.h" | 16 #include "ui/aura/client/capture_client.h" |
| 17 #include "ui/aura/env.h" | 17 #include "ui/aura/env.h" |
| 18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
| 19 #include "ui/aura/window_event_dispatcher.h" | 19 #include "ui/aura/window_event_dispatcher.h" |
| 20 #include "ui/aura/window_tree_host.h" | 20 #include "ui/aura/window_tree_host.h" |
| 21 #include "ui/base/x/x11_util.h" | 21 #include "ui/base/x/x11_util.h" |
| 22 #include "ui/events/event.h" | 22 #include "ui/events/event.h" |
| 23 #include "ui/events/event_utils.h" | 23 #include "ui/events/event_utils.h" |
| 24 #include "ui/events/keycodes/keyboard_code_conversion_x.h" | 24 #include "ui/events/keycodes/keyboard_code_conversion_x.h" |
| 25 #include "ui/events/platform/platform_event_source.h" |
| 25 #include "ui/events/platform/scoped_event_dispatcher.h" | 26 #include "ui/events/platform/scoped_event_dispatcher.h" |
| 26 #include "ui/events/platform/x11/x11_event_source.h" | 27 #include "ui/events/platform/x11/x11_event_source.h" |
| 27 #include "ui/views/widget/desktop_aura/x11_pointer_grab.h" | 28 #include "ui/views/widget/desktop_aura/x11_pointer_grab.h" |
| 28 | 29 |
| 29 namespace views { | 30 namespace views { |
| 30 | 31 |
| 31 // XGrabKey requires the modifier mask to explicitly be specified. | 32 // XGrabKey requires the modifier mask to explicitly be specified. |
| 32 const unsigned int kModifiersMasks[] = { | 33 const unsigned int kModifiersMasks[] = { |
| 33 0, // No additional modifier. | 34 0, // No additional modifier. |
| 34 Mod2Mask, // Num lock | 35 Mod2Mask, // Num lock |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 DefaultRootWindow(display), | 270 DefaultRootWindow(display), |
| 270 -100, -100, 10, 10, | 271 -100, -100, 10, 10, |
| 271 0, CopyFromParent, InputOnly, CopyFromParent, | 272 0, CopyFromParent, InputOnly, CopyFromParent, |
| 272 attribute_mask, &swa); | 273 attribute_mask, &swa); |
| 273 XMapRaised(display, window); | 274 XMapRaised(display, window); |
| 274 ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(window); | 275 ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(window); |
| 275 return window; | 276 return window; |
| 276 } | 277 } |
| 277 | 278 |
| 278 } // namespace views | 279 } // namespace views |
| OLD | NEW |