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

Unified Diff: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc

Issue 276163002: Revert of Avoids releasing capture in EndMoveLoop if capture was switched to another window while .. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/x11_whole_screen_move_loop.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/desktop_aura/x11_whole_screen_move_loop.cc
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
index 6c0b3c6b9e7962b9c3410a2a6916458ee80179f8..1db4a2226ef5bbe561958d839092029211a053d2 100644
--- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
+++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
@@ -62,7 +62,6 @@
should_reset_mouse_flags_(false),
grab_input_window_(None),
canceled_(false),
- has_grab_(false),
weak_factory_(this) {
last_xmotion_.type = LASTEvent;
}
@@ -135,11 +134,6 @@
EndMoveLoop();
return ui::POST_DISPATCH_NONE;
}
- break;
- }
- case FocusOut: {
- if (xev->xfocus.mode != NotifyGrab)
- has_grab_ = false;
break;
}
case GenericEvent: {
@@ -259,11 +253,8 @@
// Ungrab before we let go of the window.
XDisplay* display = gfx::GetXDisplay();
- // Only ungrab pointer if capture was not switched to another window.
- if (has_grab_) {
- XUngrabPointer(display, CurrentTime);
- XUngrabKeyboard(display, CurrentTime);
- }
+ XUngrabPointer(display, CurrentTime);
+ XUngrabKeyboard(display, CurrentTime);
// Restore the previous dispatcher.
nested_dispatcher_.reset();
@@ -304,7 +295,6 @@
DLOG(ERROR) << "Grabbing pointer for dragging failed: "
<< ui::GetX11ErrorString(display, ret);
} else {
- has_grab_ = true;
XUngrabKeyboard(display, CurrentTime);
ret = XGrabKeyboard(
display,
« no previous file with comments | « ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698