Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
index 3c992813568aa97c66c5617ef3a75b1be63f99dd..736129d9f477c4008b734a9378f0f83dcaba3284 100644 |
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
@@ -956,10 +956,7 @@ void DesktopWindowTreeHostX11::SetCapture() { |
if (old_capturer) |
old_capturer->OnHostLostWindowCapture(); |
- unsigned int event_mask = PointerMotionMask | ButtonReleaseMask | |
- ButtonPressMask; |
- XGrabPointer(xdisplay_, xwindow_, True, event_mask, GrabModeAsync, |
- GrabModeAsync, None, None, CurrentTime); |
+ ui::GrabPointer(xwindow_, true, None); |
} |
void DesktopWindowTreeHostX11::ReleaseCapture() { |
@@ -968,7 +965,7 @@ void DesktopWindowTreeHostX11::ReleaseCapture() { |
// the topmost window underneath the mouse so the capture release being |
// asynchronous is likely inconsequential. |
g_current_capture = NULL; |
- XUngrabPointer(xdisplay_, CurrentTime); |
+ ui::UngrabPointer(); |
OnHostLostWindowCapture(); |
} |