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.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/xorg-server/hw/xwin/winmouse.c b/xorg-server/hw/xwin/winmouse.c
index b2ee73d90..1280e6b05 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,10 +242,8 @@ 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,
@@ -253,10 +252,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
for (i = 0; i < nevents; i++)
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
}