diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-19 21:41:35 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-19 21:41:35 +1000 |
commit | 516a52f9a5b095ab60086426a1945d30a44e7ef2 (patch) | |
tree | a5783cdd5294903f75f340488fde7454a29b86e4 | |
parent | 76c9ba562bb012790636913ea6c5a6e96af578ff (diff) |
XIQueryVersion: ensure we unlock in all cases and return the status.
-rw-r--r-- | src/XIQueryVersion.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/XIQueryVersion.c b/src/XIQueryVersion.c index bf49022..4a386de 100644 --- a/src/XIQueryVersion.c +++ b/src/XIQueryVersion.c @@ -32,13 +32,16 @@ Status XIQueryVersion(Display *dpy, int *major_return, int *minor_return) { + int rc = Success; + XExtDisplayInfo *info = XInput_find_display(dpy); LockDisplay(dpy); - if (_xiQueryVersion(dpy, major_return, minor_return, info) != BadRequest) { - UnlockDisplay(dpy); - SyncHandle(); - } + rc = _xiQueryVersion(dpy, major_return, minor_return, info); + + UnlockDisplay(dpy); + SyncHandle(); + return rc; } _X_HIDDEN Status |