From 330cfbd0ca6e6d1557e08ab0c555fe87acc7be29 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 14 Feb 2008 16:33:03 +1030 Subject: Make XAnyDeviceHierarchyChangeInfo a union of the possible types. Kinda the same as the XEvent union. Some whitespace fixes too. --- XInput.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/XInput.h b/XInput.h index 774c496..8b28a94 100644 --- a/XInput.h +++ b/XInput.h @@ -999,13 +999,8 @@ typedef struct { /******************************************************************* - * + * */ - -typedef struct { - int type; -} XAnyHierarchyChangeInfo; - typedef struct { int type; char* name; @@ -1025,9 +1020,17 @@ typedef struct { int type; XDevice* device; int changeMode; /* AttachToMaster, Floating */ - XDevice* newMaster; + XDevice* newMaster; } XChangeAttachmentInfo; +typedef union { + int type; /* must be first element */ + XCreateMasterInfo create; + XRemoveMasterInfo remove; + XChangeAttachmentInfo change; +} XAnyHierarchyChangeInfo; + + /******************************************************************* * * Function definitions. -- cgit v1.2.3