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>
This commit is contained in:
Peter Hutterer 2011-11-04 14:16:37 +10:00
parent b601ea769f
commit 4bc2761ad5
3 changed files with 8 additions and 5 deletions

View File

@ -73,6 +73,7 @@ SOFTWARE.
#include "dixevents.h" #include "dixevents.h"
#include "mipointer.h" #include "mipointer.h"
#include "eventstr.h" #include "eventstr.h"
#include "dixgrabs.h"
#include <X11/extensions/XI.h> #include <X11/extensions/XI.h>
#include <X11/extensions/XI2.h> #include <X11/extensions/XI2.h>
@ -273,6 +274,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
dev->deviceGrab.grabTime = currentTime; dev->deviceGrab.grabTime = currentTime;
dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
dev->deviceGrab.activeGrab = AllocGrab();
XkbSetExtension(dev, ProcessKeyboardEvent); XkbSetExtension(dev, ProcessKeyboardEvent);
@ -941,6 +943,7 @@ CloseDevice(DeviceIntPtr dev)
} }
} }
FreeGrab(dev->deviceGrab.activeGrab);
free(dev->deviceGrab.sync.event); free(dev->deviceGrab.sync.event);
free(dev->config_info); /* Allocated in xf86ActivateDevice. */ free(dev->config_info); /* Allocated in xf86ActivateDevice. */
free(dev->last.scroll); free(dev->last.scroll);

View File

@ -1509,8 +1509,8 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab,
grabinfo->grabTime = time; grabinfo->grabTime = time;
if (grab->cursor) if (grab->cursor)
grab->cursor->refcnt++; grab->cursor->refcnt++;
CopyGrab(&grabinfo->activeGrab, grab); CopyGrab(grabinfo->activeGrab, grab);
grabinfo->grab = &grabinfo->activeGrab; grabinfo->grab = grabinfo->activeGrab;
grabinfo->fromPassiveGrab = isPassive; grabinfo->fromPassiveGrab = isPassive;
grabinfo->implicitGrab = autoGrab & ImplicitGrabMask; grabinfo->implicitGrab = autoGrab & ImplicitGrabMask;
PostNewCursor(mouse); PostNewCursor(mouse);
@ -1586,8 +1586,8 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass
grabinfo->grabTime = syncEvents.time; grabinfo->grabTime = syncEvents.time;
else else
grabinfo->grabTime = time; grabinfo->grabTime = time;
CopyGrab(&grabinfo->activeGrab, grab); CopyGrab(grabinfo->activeGrab, grab);
grabinfo->grab = &grabinfo->activeGrab; grabinfo->grab = grabinfo->activeGrab;
grabinfo->fromPassiveGrab = passive; grabinfo->fromPassiveGrab = passive;
grabinfo->implicitGrab = passive & ImplicitGrabMask; grabinfo->implicitGrab = passive & ImplicitGrabMask;
CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode); CheckGrabForSyncs(keybd, (Bool)grab->keyboardMode, (Bool)grab->pointerMode);

View File

@ -451,7 +451,7 @@ typedef struct _GrabInfoRec {
TimeStamp grabTime; TimeStamp grabTime;
Bool fromPassiveGrab; /* true if from passive grab */ Bool fromPassiveGrab; /* true if from passive grab */
Bool implicitGrab; /* implicit from ButtonPress */ Bool implicitGrab; /* implicit from ButtonPress */
GrabRec activeGrab; GrabPtr activeGrab;
GrabPtr grab; GrabPtr grab;
CARD8 activatingKey; CARD8 activatingKey;
void (*ActivateGrab) ( void (*ActivateGrab) (