aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive')
-rw-r--r--xorg-server/hw/kdrive/fake/fake.c7
-rw-r--r--xorg-server/hw/kdrive/src/kinput.c39
2 files changed, 7 insertions, 39 deletions
diff --git a/xorg-server/hw/kdrive/fake/fake.c b/xorg-server/hw/kdrive/fake/fake.c
index 626b2d25a..21360b16d 100644
--- a/xorg-server/hw/kdrive/fake/fake.c
+++ b/xorg-server/hw/kdrive/fake/fake.c
@@ -215,11 +215,8 @@ fakeUnmapFramebuffer (KdScreenInfo *screen)
{
FakePriv *priv = screen->card->driver;
KdShadowFbFree (screen);
- if (priv->base)
- {
- free (priv->base);
- priv->base = 0;
- }
+ free(priv->base);
+ priv->base = NULL;
return TRUE;
}
diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c
index 0cadbd981..0485dc413 100644
--- a/xorg-server/hw/kdrive/src/kinput.c
+++ b/xorg-server/hw/kdrive/src/kinput.c
@@ -48,6 +48,7 @@
#include "exglobals.h"
#include "eventstr.h"
#include "xserver-properties.h"
+#include "inpututils.h"
#define AtomFromName(x) MakeAtom(x, strlen(x), 1)
@@ -943,10 +944,6 @@ KdAddKeyboard (KdKeyboardInfo *ki)
return !Success;
}
- ki->dixdev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
- ki->dixdev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
- RegisterOtherDevice(ki->dixdev);
-
#ifdef DEBUG
ErrorF("added keyboard %s with dix id %d\n", ki->name, ki->dixdev->id);
#endif
@@ -1014,10 +1011,6 @@ KdAddPointer (KdPointerInfo *pi)
return BadDevice;
}
- pi->dixdev->deviceGrab.ActivateGrab = ActivatePointerGrab;
- pi->dixdev->deviceGrab.DeactivateGrab = DeactivatePointerGrab;
- RegisterOtherDevice(pi->dixdev);
-
for (prev = &kdPointers; *prev; prev = &(*prev)->next);
*prev = pi;
@@ -1975,14 +1968,16 @@ _KdEnqueuePointerEvent (KdPointerInfo *pi, int type, int x, int y, int z,
{
int nEvents = 0, i = 0;
int valuators[3] = { x, y, z };
+ ValuatorMask mask;
/* TRUE from KdHandlePointerEvent, means 'we swallowed the event'. */
if (!force && KdHandlePointerEvent(pi, type, x, y, z, b, absrel))
return;
+ valuator_mask_set_range(&mask, 0, 3, valuators);
+
GetEventList(&kdEvents);
- nEvents = GetPointerEvents(kdEvents, pi->dixdev, type, b, absrel,
- 0, 3, valuators);
+ nEvents = GetPointerEvents(kdEvents, pi->dixdev, type, b, absrel, &mask);
for (i = 0; i < nEvents; i++)
KdQueueEvent(pi->dixdev, (InternalEvent *)((kdEvents + i)->event));
}
@@ -2184,30 +2179,6 @@ ProcessInputEvents (void)
KdCheckLock ();
}
-/* FIXME use XSECURITY to work out whether the client should be allowed to
- * open and close. */
-void
-OpenInputDevice(DeviceIntPtr pDev, ClientPtr client, int *status)
-{
- if (!pDev)
- *status = BadDevice;
- else
- *status = Success;
-}
-
-void
-CloseInputDevice(DeviceIntPtr pDev, ClientPtr client)
-{
- return;
-}
-
-/* We initialise all input devices at startup. */
-void
-AddOtherInputDevices(void)
-{
- return;
-}
-
/* At the moment, absolute/relative is up to the client. */
int
SetDeviceMode(register ClientPtr client, DeviceIntPtr pDev, int mode)