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

Side by Side Diff: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc

Issue 16271006: Drag on linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Document Created 7 years, 6 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 | Annotate | Revision Log
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 <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 8 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
9 #undef RootWindow 9 #undef RootWindow
10 10
(...skipping 25 matching lines...) Expand all
36 bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) { 36 bool X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
37 XEvent* xev = event; 37 XEvent* xev = event;
38 38
39 // Note: the escape key is handled in the tab drag controller, which has 39 // Note: the escape key is handled in the tab drag controller, which has
40 // keyboard focus even though we took pointer grab. 40 // keyboard focus even though we took pointer grab.
41 switch (xev->type) { 41 switch (xev->type) {
42 case MotionNotify: { 42 case MotionNotify: {
43 delegate_->OnMouseMovement(&xev->xmotion); 43 delegate_->OnMouseMovement(&xev->xmotion);
44 break; 44 break;
45 } 45 }
46 case ButtonPress:
47 case ButtonRelease: { 46 case ButtonRelease: {
48 EndMoveLoop(); 47 delegate_->OnMouseReleased();
49 break; 48 break;
50 } 49 }
51 } 50 }
52 51
53 return true; 52 return true;
54 } 53 }
55 54
56 //////////////////////////////////////////////////////////////////////////////// 55 ////////////////////////////////////////////////////////////////////////////////
57 // DesktopRootWindowHostLinux, aura::client::WindowMoveClient implementation: 56 // DesktopRootWindowHostLinux, aura::client::WindowMoveClient implementation:
58 57
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow( 128 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(
130 grab_input_window_); 129 grab_input_window_);
131 delegate_->OnMoveLoopEnded(); 130 delegate_->OnMoveLoopEnded();
132 XDestroyWindow(display, grab_input_window_); 131 XDestroyWindow(display, grab_input_window_);
133 132
134 in_move_loop_ = false; 133 in_move_loop_ = false;
135 quit_closure_.Run(); 134 quit_closure_.Run();
136 } 135 }
137 136
138 } // namespace views 137 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698