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, |