diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-11-04 14:16:37 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-09 14:56:23 +1000 |
commit | 4bc2761ad5ec2d0668aec639780ffb136605fbc8 (patch) | |
tree | ff3915cc3d63e6546f6c38615be789b3f3b9d197 | |
parent | b601ea769f1b8a4d7f19e9d4a13541c78e865fe5 (diff) |
dix: switch the dev->deviceGrab.activeGrab from GrabRec to GrabPtr
This breaks the input ABI.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r-- | dix/devices.c | 3 | ||||
-rw-r--r-- | dix/events.c | 8 | ||||
-rw-r--r-- | include/inputstr.h | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/dix/devices.c b/dix/devices.c index 37cbcdb78..e448eab62 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -73,6 +73,7 @@ SOFTWARE. #include "dixevents.h" #include "mipointer.h" #include "eventstr.h" +#include "dixgrabs.h" #include <X11/extensions/XI.h> #include <X11/extensions/XI2.h> @@ -273,6 +274,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) dev->deviceGrab.grabTime = currentTime; dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; + dev->deviceGrab.activeGrab = AllocGrab(); XkbSetExtension(dev, ProcessKeyboardEvent); @@ -941,6 +943,7 @@ CloseDevice(DeviceIntPtr dev) } } + FreeGrab(dev->deviceGrab.activeGrab); free(dev->deviceGrab.sync.event); free(dev->config_info); /* Allocated in xf86ActivateDevice. */ free(dev->last.scroll); diff --git a/dix/events.c b/dix/events.c index bd7e93b6c..8f8531cf1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1509,8 +1509,8 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, grabinfo->grabTime = time; if (grab->cursor) grab->cursor->refcnt++; - CopyGrab(&grabinfo->activeGrab, grab); - grabinfo->grab = &grabinfo->activeGrab; + CopyGrab(grabinfo->activeGrab, grab); + grabinfo->grab = grabinfo->activeGrab; grabinfo->fromPassiveGrab = isPassive; grabinfo->implicitGrab = autoGrab & ImplicitGrabMask; PostNewCursor(mouse); @@ -1586,8 +1586,8 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass grabinfo->grabTime = syncEvents.time; else grabinfo->grabTime = time; - CopyGrab(&grabinfo->activeGrab, grab); - grabinfo->grab = &grabinfo->activeGrab; + CopyGrab(grabinfo->activeGrab, grab); + grabinfo->grab = grabinfo->activeGrab; grabinfo->fromPassiveGrab = passive; grabinfo->implicitGrab = passive & ImplicitGrabMask; CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode); diff --git a/include/inputstr.h b/include/inputstr.h index 0568e0c9d..f9cb8fe0f 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -451,7 +451,7 @@ typedef struct _GrabInfoRec { TimeStamp grabTime; Bool fromPassiveGrab; /* true if from passive grab */ Bool implicitGrab; /* implicit from ButtonPress */ - GrabRec activeGrab; + GrabPtr activeGrab; GrabPtr grab; CARD8 activatingKey; void (*ActivateGrab) ( |