aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winmouse.c')
-rw-r--r--xorg-server/hw/xwin/winmouse.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/xorg-server/hw/xwin/winmouse.c b/xorg-server/hw/xwin/winmouse.c
index 99eb6b8d2..835c69d50 100644
--- a/xorg-server/hw/xwin/winmouse.c
+++ b/xorg-server/hw/xwin/winmouse.c
@@ -36,14 +36,19 @@
#endif
#include "win.h"
-#if defined(XFree86Server)
+#ifdef XKB
+#ifndef XKB_IN_SERVER
+#define XKB_IN_SERVER
+#endif
+#include <xkbsrv.h>
+#endif
+
#include "inputstr.h"
#include "exevents.h" /* for button/axes labels */
#include "xserver-properties.h"
/* Peek the internal button mapping */
static CARD8 const *g_winMouseButtonMap = NULL;
-#endif
/*
@@ -90,7 +95,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
*/
if (lngMouseButtons < 3)
lngMouseButtons = 3;
- winMsg(X_PROBED, "%d mouse buttons found\n", lngMouseButtons);
+ winDebug("%d mouse buttons found\n", lngMouseButtons);
/* allocate memory:
* number of buttons + 2x mouse wheel event + 1 extra (offset for map)
@@ -123,9 +128,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
free(map);
free(btn_labels);
-#if defined(XFree86Server)
g_winMouseButtonMap = pDeviceInt->button->map;
-#endif
break;
case DEVICE_ON:
@@ -133,9 +136,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
break;
case DEVICE_CLOSE:
-#if defined(XFree86Server)
g_winMouseButtonMap = NULL;
-#endif
case DEVICE_OFF:
pDevice->on = FALSE;
break;
@@ -241,22 +242,18 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
EventListPtr events;
int i, nevents;
-#if defined(XFree86Server)
if (g_winMouseButtonMap)
iButton = g_winMouseButtonMap[iButton];
-#endif
GetEventList(&events);
nevents = GetPointerEvents(events, g_pwinPointer, iEventType, iButton,
POINTER_RELATIVE, 0, 0, NULL);
for (i = 0; i < nevents; i++)
- mieqEnqueue(g_pwinPointer, events[i].event);
+ mieqEnqueue(g_pwinPointer, (InternalEvent*)(events + i)->event);
-#if CYGDEBUG
- ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
+ winDebug("winMouseButtonsSendEvent: iEventType: %d, iButton: %d, nEvents %d\n",
iEventType, iButton, nevents);
-#endif
}
@@ -384,5 +381,5 @@ void winEnqueueMotion(int x, int y)
POINTER_ABSOLUTE, 0, 2, valuators);
for (i = 0; i < nevents; i++)
- mieqEnqueue(g_pwinPointer, events[i].event);
+ mieqEnqueue(g_pwinPointer, (InternalEvent*)(events + i)->event);
}