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

Side by Side Diff: ui/views/widget/x11_desktop_window_move_client.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 1 month 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/x11_desktop_window_move_client.h" 5 #include "ui/views/widget/x11_desktop_window_move_client.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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 ui::EventResult X11DesktopWindowMoveClient::PreHandleGestureEvent( 66 ui::EventResult X11DesktopWindowMoveClient::PreHandleGestureEvent(
67 aura::Window* target, 67 aura::Window* target,
68 ui::GestureEvent* event) { 68 ui::GestureEvent* event) {
69 return ui::ER_UNHANDLED; 69 return ui::ER_UNHANDLED;
70 } 70 }
71 71
72 aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop( 72 aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop(
73 aura::Window* source, 73 aura::Window* source,
74 const gfx::Point& drag_offset) { 74 const gfx::Vector2d& drag_offset) {
75 DCHECK(!in_move_loop_); // Can only handle one nested loop at a time. 75 DCHECK(!in_move_loop_); // Can only handle one nested loop at a time.
76 in_move_loop_ = true; 76 in_move_loop_ = true;
77 window_offset_ = drag_offset; 77 window_offset_ = drag_offset;
78 78
79 source->GetRootWindow()->ShowRootWindow(); 79 source->GetRootWindow()->ShowRootWindow();
80 80
81 Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay(); 81 Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay();
82 XGrabServer(display); 82 XGrabServer(display);
83 XUngrabPointer(display, CurrentTime); 83 XUngrabPointer(display, CurrentTime);
84 84
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // Ungrab before we let go of the window. 117 // Ungrab before we let go of the window.
118 Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay(); 118 Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay();
119 XUngrabPointer(display, CurrentTime); 119 XUngrabPointer(display, CurrentTime);
120 120
121 in_move_loop_ = false; 121 in_move_loop_ = false;
122 quit_closure_.Run(); 122 quit_closure_.Run();
123 } 123 }
124 124
125 } // namespace views 125 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698