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

Unified Diff: ui/base/x/x11_util.cc

Issue 821803002: Use XGrabPointer instead of XChangeActivatePointerGrab() to change the cursor during a pointer grab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_capture
Patch Set: Created 6 years 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
Index: ui/base/x/x11_util.cc
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index 03625c6de02f0782c1b8d3861f447c156daa0377..72e0e80912cbd619191e1076b88a95fa9c7dd501 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -284,6 +284,16 @@ bool IsXInput2Available() {
return DeviceDataManagerX11::GetInstance()->IsXInput2Available();
}
+int GrabPointer(XID window, bool owner_events, ::Cursor cursor) {
pkotwicz 2014/12/22 23:44:16 The semantics of DesktopWindowTreeHostX11::SetCapt
sadrul 2014/12/23 16:53:50 How does this transfer happen? Can it be done by t
pkotwicz 2014/12/23 18:22:22 The transfer occurs internally in X. The transfer
sadrul 2015/01/14 20:34:01 Where in the chrome code do we attempt to transfer
pkotwicz 2015/01/14 20:50:07 We transfer capture from one WTH to another when d
+ int event_mask = PointerMotionMask | ButtonReleaseMask | ButtonPressMask;
+ return XGrabPointer(gfx::GetXDisplay(), window, owner_events, event_mask,
+ GrabModeAsync, GrabModeAsync, None, cursor, CurrentTime);
+}
+
+void UngrabPointer() {
+ XUngrabPointer(gfx::GetXDisplay(), CurrentTime);
+}
+
static SharedMemorySupport DoQuerySharedMemorySupport(XDisplay* dpy) {
int dummy;
Bool pixmaps_supported;

Powered by Google App Engine
This is Rietveld 408576698