summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-05-26 23:16:29 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-26 23:18:55 +0930
commit0721b2d71c40e877944aa22a3c57ed70225f508d (patch)
tree3b6bb15ea1ea358edb1552b0efb384ce094f30a9
parent44d3a4d4016c58f8ac46843d0b2dd4ddb26e2fc9 (diff)
Xge: Replace XExtensionVersion with XGEVersionRec.
XExtensionVersion is defined in XInput.h, leading to a circular dependency. Thanks to Jens Stroebel for pointing this out.
-rw-r--r--src/Xge.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/Xge.c b/src/Xge.c
index b9154a4..90fbce5 100644
--- a/src/Xge.c
+++ b/src/Xge.c
@@ -39,7 +39,6 @@
#include <X11/extensions/geproto.h>
#include <X11/extensions/ge.h>
#include <X11/Xlibint.h>
-#include <X11/extensions/XInput.h>
#include <X11/extensions/extutil.h>
#include <X11/extensions/Xge.h>
@@ -47,6 +46,12 @@
/* internal data structures */
/***********************************************************************/
+typedef struct {
+ int present;
+ short major_version;
+ short minor_version;
+} XGEVersionRec;
+
/* NULL terminated list of registered extensions. */
typedef struct _XGEExtNode {
int extension;
@@ -57,18 +62,19 @@ typedef struct _XGEExtNode {
/* Internal data for GE extension */
typedef struct _XGEData {
XEvent data;
- XExtensionVersion *vers;
+ XGEVersionRec *vers;
XGEExtList extensions;
} XGEData;
+
/* forward declarations */
extern XExtDisplayInfo* _xgeFindDisplay(Display*);
static Bool _xgeWireToEvent(Display*, XEvent*, xEvent*);
Status _xgeEventToWire(Display*, XEvent*, xEvent*);
static int _xgeDpyClose(Display*, XExtCodes*);
-static XExtensionVersion* _xgeGetExtensionVersion(Display*,
- _Xconst char*,
- XExtDisplayInfo*);
+static XGEVersionRec* _xgeGetExtensionVersion(Display*,
+ _Xconst char*,
+ XExtDisplayInfo*);
static Bool _xgeCheckExtension(Display* dpy, XExtDisplayInfo* info);
/* main extension information data */
@@ -161,14 +167,14 @@ _xgeCheckExtension(Display* dpy, XExtDisplayInfo* info)
/* Retrieve XGE version number from server. */
-static XExtensionVersion*
+static XGEVersionRec*
_xgeGetExtensionVersion(Display* dpy,
_Xconst char* name,
XExtDisplayInfo*info)
{
xGEQueryVersionReply rep;
xGEQueryVersionReq *req;
- XExtensionVersion *vers;
+ XGEVersionRec *vers;
GetReq(GEQueryVersion, req);
req->reqType = info->codes->major_opcode;
@@ -182,7 +188,7 @@ _xgeGetExtensionVersion(Display* dpy,
return NULL;
}
- vers = (XExtensionVersion*)Xmalloc(sizeof(XExtensionVersion));
+ vers = (XGEVersionRec*)Xmalloc(sizeof(XGEVersionRec));
vers->major_version = rep.majorVersion;
vers->minor_version = rep.minorVersion;
return vers;