From c27e00ceceed3fea011c98c0e70ab568bf0687c6 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sun, 15 Oct 2006 00:26:21 -0700 Subject: Don't call XInput_find_display in _XiCheckExtInit, while the Display lock is held. All callers of _XiCheckExtInit have already called XInput_find_display first outside the lock, so just pass their copy of the XExtDisplayInfo structure down. Besides being more correct, this should be slightly faster. :-) Thanks to Magnus Kessler for identifying the bug and proposing a workaround. --- src/XGrabDev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/XGrabDev.c') diff --git a/src/XGrabDev.c b/src/XGrabDev.c index 536e369..92f1c11 100644 --- a/src/XGrabDev.c +++ b/src/XGrabDev.c @@ -78,7 +78,7 @@ XGrabDevice(dpy, dev, grab_window, ownerEvents, event_count, event_list, XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_XiCheckExtInit(dpy, XInput_Initial_Release) == -1) + if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1) return (NoSuchExtension); GetReq(GrabDevice, req); -- cgit v1.2.3