summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-06-13 16:26:03 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-06-13 16:26:03 +0930
commit40d1cbaaf0fd12883c048288a62b0088286463f4 (patch)
tree415532487ff2dced57a507d2e58c0734816c166d
parentb125890386d5ebbc3811bc67e0a1ad469b0a10ed (diff)
Lock/Unlock in _xgeCheckExtInit(), and not in xgeGetExtensionVersion().
Otherwise we get a SIGABRT for displays that don't have XGE when we try to get the disply lock.
-rw-r--r--src/Xge.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Xge.c b/src/Xge.c
index f4ec0f2..bcdd483 100644
--- a/src/Xge.c
+++ b/src/Xge.c
@@ -121,6 +121,7 @@ XExtDisplayInfo *_xgeFindDisplay(Display *dpy)
Bool
_xgeCheckExtInit(Display* dpy, XExtDisplayInfo* info)
{
+ LockDisplay(dpy);
if(!_xgeCheckExtension(dpy, info))
{
goto cleanup;
@@ -139,6 +140,7 @@ _xgeCheckExtInit(Display* dpy, XExtDisplayInfo* info)
info->data = (XPointer)data;
}
+ UnlockDisplay(dpy);
return True;
cleanup:
@@ -165,8 +167,6 @@ _xgeGetExtensionVersion(Display* dpy,
xGEQueryVersionReq *req;
XExtensionVersion *vers;
-
- LockDisplay(dpy);
GetReq(GEQueryVersion, req);
req->reqType = info->codes->major_opcode;
req->ReqType = X_GEQueryVersion;
@@ -175,8 +175,6 @@ _xgeGetExtensionVersion(Display* dpy,
if (!_XReply (dpy, (xReply *) &rep, 0, xTrue))
{
- UnlockDisplay (dpy);
- SyncHandle ();
Xfree(info);
return NULL;
}
@@ -184,7 +182,6 @@ _xgeGetExtensionVersion(Display* dpy,
vers = (XExtensionVersion*)Xmalloc(sizeof(XExtensionVersion));
vers->major_version = rep.majorVersion;
vers->minor_version = rep.minorVersion;
- UnlockDisplay (dpy);
return vers;
}