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

Side by Side Diff: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.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
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/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>
(...skipping 30 matching lines...) Expand all
41 Mod5Mask, // Scroll lock 41 Mod5Mask, // Scroll lock
42 Mod2Mask | LockMask, 42 Mod2Mask | LockMask,
43 Mod2Mask | Mod5Mask, 43 Mod2Mask | Mod5Mask,
44 LockMask | Mod5Mask, 44 LockMask | Mod5Mask,
45 Mod2Mask | LockMask | Mod5Mask 45 Mod2Mask | LockMask | Mod5Mask
46 }; 46 };
47 47
48 X11WholeScreenMoveLoop::X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate) 48 X11WholeScreenMoveLoop::X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate)
49 : delegate_(delegate), 49 : delegate_(delegate),
50 in_move_loop_(false), 50 in_move_loop_(false),
51 initial_cursor_(ui::kCursorNull), 51 initial_cursor_(ui::CursorType::kNull),
52 should_reset_mouse_flags_(false), 52 should_reset_mouse_flags_(false),
53 grab_input_window_(None), 53 grab_input_window_(None),
54 grabbed_pointer_(false), 54 grabbed_pointer_(false),
55 canceled_(false), 55 canceled_(false),
56 weak_factory_(this) { 56 weak_factory_(this) {}
57 }
58 57
59 X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {} 58 X11WholeScreenMoveLoop::~X11WholeScreenMoveLoop() {}
60 59
61 void X11WholeScreenMoveLoop::DispatchMouseMovement() { 60 void X11WholeScreenMoveLoop::DispatchMouseMovement() {
62 if (!last_motion_in_screen_) 61 if (!last_motion_in_screen_)
63 return; 62 return;
64 delegate_->OnMouseMovement(last_motion_in_screen_->location(), 63 delegate_->OnMouseMovement(last_motion_in_screen_->location(),
65 last_motion_in_screen_->flags(), 64 last_motion_in_screen_->flags(),
66 last_motion_in_screen_->time_stamp()); 65 last_motion_in_screen_->time_stamp());
67 last_motion_in_screen_.reset(); 66 last_motion_in_screen_.reset();
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 PointerMotionMask | KeyPressMask | KeyReleaseMask | 275 PointerMotionMask | KeyPressMask | KeyReleaseMask |
277 StructureNotifyMask; 276 StructureNotifyMask;
278 grab_input_window_events_.reset( 277 grab_input_window_events_.reset(
279 new ui::XScopedEventSelector(grab_input_window_, event_mask)); 278 new ui::XScopedEventSelector(grab_input_window_, event_mask));
280 279
281 XMapRaised(display, grab_input_window_); 280 XMapRaised(display, grab_input_window_);
282 ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(grab_input_window_); 281 ui::X11EventSource::GetInstance()->BlockUntilWindowMapped(grab_input_window_);
283 } 282 }
284 283
285 } // namespace views 284 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc ('k') | ui/wm/core/compound_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698