summaryrefslogtreecommitdiff
path: root/src/XGetKMap.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2006-10-15 00:26:21 -0700
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-11-08 16:20:05 +0200
commitf0f5fb7b4eb685094fc64aa1b46573991e84589f (patch)
tree883ccc0c16273eb588f084fa9afb7a95fdf22508 /src/XGetKMap.c
parent93d3c2c45ccd9a806342746c4df33c684a284dd6 (diff)
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 <Magnus.Kessler@gmx.net> for identifying the bug and proposing a workaround. (cherry picked from c27e00ceceed3fea011c98c0e70ab568bf0687c6 commit)
Diffstat (limited to 'src/XGetKMap.c')
-rw-r--r--src/XGetKMap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XGetKMap.c b/src/XGetKMap.c
index 59f6f93..0381e86 100644
--- a/src/XGetKMap.c
+++ b/src/XGetKMap.c
@@ -76,7 +76,7 @@ XGetDeviceKeyMapping(register Display * dpy, XDevice * dev,
XExtDisplayInfo *info = XInput_find_display(dpy);
LockDisplay(dpy);
- if (_XiCheckExtInit(dpy, XInput_Initial_Release) == -1)
+ if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
return ((KeySym *) NoSuchExtension);
GetReq(GetDeviceKeyMapping, req);