diff options
author | marha <marha@users.sourceforge.net> | 2011-12-12 14:26:41 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-12-12 14:26:41 +0100 |
commit | 2b5652fc7742c5ac57aca701214b046626a729e9 (patch) | |
tree | a994b9e63a32a7c061bcfb563aa22369c217e49c /xorg-server/Xi/ungrdevb.c | |
parent | 2331d6e4ac699e775ccee07a8a461cae0a98033a (diff) | |
parent | 5efb0a5e19b75137b7294b27f4e7878aeb8f0927 (diff) | |
download | vcxsrv-2b5652fc7742c5ac57aca701214b046626a729e9.tar.gz vcxsrv-2b5652fc7742c5ac57aca701214b046626a729e9.tar.bz2 vcxsrv-2b5652fc7742c5ac57aca701214b046626a729e9.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'xorg-server/Xi/ungrdevb.c')
-rw-r--r-- | xorg-server/Xi/ungrdevb.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/xorg-server/Xi/ungrdevb.c b/xorg-server/Xi/ungrdevb.c index 9e9ece47a..628024870 100644 --- a/xorg-server/Xi/ungrdevb.c +++ b/xorg-server/Xi/ungrdevb.c @@ -96,7 +96,7 @@ ProcXUngrabDeviceButton(ClientPtr client) DeviceIntPtr dev; DeviceIntPtr mdev; WindowPtr pWin; - GrabRec temporaryGrab; + GrabPtr temporaryGrab; int rc; REQUEST(xUngrabDeviceButtonReq); @@ -126,17 +126,23 @@ ProcXUngrabDeviceButton(ClientPtr client) (stuff->modifiers & ~AllModifiersMask)) return BadValue; - temporaryGrab.resource = client->clientAsMask; - temporaryGrab.device = dev; - temporaryGrab.window = pWin; - temporaryGrab.type = DeviceButtonPress; - temporaryGrab.grabtype = GRABTYPE_XI; - temporaryGrab.modifierDevice = mdev; - temporaryGrab.modifiersDetail.exact = stuff->modifiers; - temporaryGrab.modifiersDetail.pMask = NULL; - temporaryGrab.detail.exact = stuff->button; - temporaryGrab.detail.pMask = NULL; - - DeletePassiveGrabFromList(&temporaryGrab); + temporaryGrab = AllocGrab(); + if (!temporaryGrab) + return BadAlloc; + + temporaryGrab->resource = client->clientAsMask; + temporaryGrab->device = dev; + temporaryGrab->window = pWin; + temporaryGrab->type = DeviceButtonPress; + temporaryGrab->grabtype = GRABTYPE_XI; + temporaryGrab->modifierDevice = mdev; + temporaryGrab->modifiersDetail.exact = stuff->modifiers; + temporaryGrab->modifiersDetail.pMask = NULL; + temporaryGrab->detail.exact = stuff->button; + temporaryGrab->detail.pMask = NULL; + + DeletePassiveGrabFromList(temporaryGrab); + + FreeGrab(temporaryGrab); return Success; } |