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

Unified Diff: ui/views/widget/x11_desktop_window_move_client.cc

Issue 10909043: Cancel drag if display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/x11_desktop_window_move_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/x11_desktop_window_move_client.cc
diff --git a/ui/views/widget/x11_desktop_window_move_client.cc b/ui/views/widget/x11_desktop_window_move_client.cc
index 329a65688a45bfea4880e02c2ccb705438129f6a..adb6ff3b609a202480f39306280c0005f1ab8e81 100644
--- a/ui/views/widget/x11_desktop_window_move_client.cc
+++ b/ui/views/widget/x11_desktop_window_move_client.cc
@@ -69,8 +69,9 @@ ui::EventResult X11DesktopWindowMoveClient::PreHandleGestureEvent(
return ui::ER_UNHANDLED;
}
-void X11DesktopWindowMoveClient::RunMoveLoop(aura::Window* source,
- const gfx::Point& drag_offset) {
+aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop(
+ aura::Window* source,
+ const gfx::Point& drag_offset) {
DCHECK(!in_move_loop_); // Can only handle one nested loop at a time.
in_move_loop_ = true;
window_offset_ = drag_offset;
@@ -94,7 +95,7 @@ void X11DesktopWindowMoveClient::RunMoveLoop(aura::Window* source,
XUngrabServer(display);
if (ret != GrabSuccess) {
DLOG(ERROR) << "Grabbing new tab for dragging failed: " << ret;
- return;
+ return aura::client::MOVE_CANCELED;
}
MessageLoopForUI* loop = MessageLoopForUI::current();
@@ -102,6 +103,7 @@ void X11DesktopWindowMoveClient::RunMoveLoop(aura::Window* source,
base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
quit_closure_ = run_loop.QuitClosure();
run_loop.Run();
+ return aura::client::MOVE_SUCCESSFUL;
}
void X11DesktopWindowMoveClient::EndMoveLoop() {
« no previous file with comments | « ui/views/widget/x11_desktop_window_move_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698