diff options
author | marha <marha@users.sourceforge.net> | 2013-01-07 11:56:06 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-01-07 11:56:06 +0100 |
commit | 3f553aaceddc9b09363c73d9bea40eaea8164fc4 (patch) | |
tree | b112d1ad761f8621106f8930daaf97fafed339fb /xorg-server/Xi/extinit.c | |
parent | 293fd0043af7e861c9c540bebc44630d0da0bf9b (diff) | |
download | vcxsrv-3f553aaceddc9b09363c73d9bea40eaea8164fc4.tar.gz vcxsrv-3f553aaceddc9b09363c73d9bea40eaea8164fc4.tar.bz2 vcxsrv-3f553aaceddc9b09363c73d9bea40eaea8164fc4.zip |
pixman xkbcomp libX11 libXau mesa fontconfig xserver xkeyboard-config git update 7 jan 2013
fontconfig: 17eda89ed2e24a3fc5f68538dd7fd9ada8efb087
xserver: bd91b05b631f13afd1f7a9d6cbc4f0c5408b523a
xkeyboard-config: 4779e2745094ebe0c06364b4099d7067ae750d07
libX11: cd25cab4b5b957641183ce72dd1ae0424aff1663
libXau: e04364efccbb3bb4cfc5f4cb491ffa1faaaacbdb
mesa: afec10df373f342f058aab66c622237964a4a147
pixman: 35cc965514ca6e665c18411fcf66db826d559c2a
xkbcomp: e4f767913338052527538d429931e8abd8c3fb88
Diffstat (limited to 'xorg-server/Xi/extinit.c')
-rw-r--r-- | xorg-server/Xi/extinit.c | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/xorg-server/Xi/extinit.c b/xorg-server/Xi/extinit.c index 7e3075551..619d0e468 100644 --- a/xorg-server/Xi/extinit.c +++ b/xorg-server/Xi/extinit.c @@ -122,6 +122,7 @@ SOFTWARE. #include "xiqueryversion.h" #include "xisetclientpointer.h" #include "xiwarppointer.h" +#include "xibarriers.h" /* Masks for XI events have to be aligned with core event (partially anyway). * If DeviceButtonMotionMask is != ButtonMotionMask, event delivery @@ -251,7 +252,8 @@ static int (*ProcIVector[]) (ClientPtr) = { ProcXIChangeProperty, /* 57 */ ProcXIDeleteProperty, /* 58 */ ProcXIGetProperty, /* 59 */ - ProcXIGetSelectedEvents /* 60 */ + ProcXIGetSelectedEvents, /* 60 */ + ProcXIBarrierReleasePointer /* 61 */ }; /* For swapped clients */ @@ -316,7 +318,8 @@ static int (*SProcIVector[]) (ClientPtr) = { SProcXIChangeProperty, /* 57 */ SProcXIDeleteProperty, /* 58 */ SProcXIGetProperty, /* 59 */ - SProcXIGetSelectedEvents /* 60 */ + SProcXIGetSelectedEvents, /* 60 */ + SProcXIBarrierReleasePointer /* 61 */ }; /***************************************************************** @@ -646,7 +649,7 @@ SDeviceChangedEvent(xXIDeviceChangedEvent * from, xXIDeviceChangedEvent * to) *to = *from; memcpy(&to[1], &from[1], from->length * 4); - any = (xXIAnyInfo *) & to[1]; + any = (xXIAnyInfo *) &to[1]; for (i = 0; i < to->num_classes; i++) { int length = any->length; @@ -654,7 +657,7 @@ SDeviceChangedEvent(xXIDeviceChangedEvent * from, xXIDeviceChangedEvent * to) case KeyClass: { xXIKeyInfo *ki = (xXIKeyInfo *) any; - uint32_t *key = (uint32_t *) & ki[1]; + uint32_t *key = (uint32_t *) &ki[1]; for (j = 0; j < ki->num_keycodes; j++, key++) swapl(key); @@ -765,7 +768,7 @@ SDeviceHierarchyEvent(xXIHierarchyEvent * from, xXIHierarchyEvent * to) swapl(&to->flags); swaps(&to->num_info); - info = (xXIHierarchyInfo *) & to[1]; + info = (xXIHierarchyInfo *) &to[1]; for (i = 0; i < from->num_info; i++) { swaps(&info->deviceid); swaps(&info->attachment); @@ -839,6 +842,32 @@ STouchOwnershipEvent(xXITouchOwnershipEvent * from, xXITouchOwnershipEvent * to) swapl(&to->child); } +static void +SBarrierEvent(xXIBarrierEvent * from, + xXIBarrierEvent * to) { + + *to = *from; + + swaps(&from->sequenceNumber); + swapl(&from->length); + swaps(&from->evtype); + swapl(&from->time); + swaps(&from->deviceid); + swaps(&from->sourceid); + swapl(&from->event); + swapl(&from->root); + swapl(&from->root_x); + swapl(&from->root_y); + + swapl(&from->dx.integral); + swapl(&from->dx.frac); + swapl(&from->dy.integral); + swapl(&from->dy.frac); + swapl(&from->dtime); + swapl(&from->barrier); + swapl(&from->eventid); +} + /** Event swapping function for XI2 events. */ void XI2EventSwap(xGenericEvent *from, xGenericEvent *to) @@ -885,6 +914,11 @@ XI2EventSwap(xGenericEvent *from, xGenericEvent *to) case XI_RawTouchEnd: SRawEvent((xXIRawEvent *) from, (xXIRawEvent *) to); break; + case XI_BarrierHit: + case XI_BarrierLeave: + SBarrierEvent((xXIBarrierEvent *) from, + (xXIBarrierEvent *) to); + break; default: ErrorF("[Xi] Unknown event type to swap. This is a bug.\n"); break; @@ -1263,6 +1297,9 @@ XInputExtensionInit(void) if (!AddCallback(&ClientStateCallback, XIClientCallback, 0)) FatalError("Failed to add callback to XI.\n"); + if (!XIBarrierInit()) + FatalError("Could not initialize barriers.\n"); + extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch, SProcIDispatch, IResetProc, StandardMinorOpcode); if (extEntry) { |