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.c34
1 files changed, 13 insertions, 21 deletions
diff --git a/xorg-server/hw/xwin/winmouse.c b/xorg-server/hw/xwin/winmouse.c
index 99509f28e..e7cb1ccb7 100644
--- a/xorg-server/hw/xwin/winmouse.c
+++ b/xorg-server/hw/xwin/winmouse.c
@@ -36,6 +36,13 @@
#endif
#include "win.h"
+#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"
@@ -44,21 +51,6 @@
/* Peek the internal button mapping */
static CARD8 const *g_winMouseButtonMap = NULL;
-
-/*
- * Local prototypes
- */
-
-static void
-winMouseCtrl (DeviceIntPtr pDevice, PtrCtrl *pCtrl);
-
-
-static void
-winMouseCtrl (DeviceIntPtr pDevice, PtrCtrl *pCtrl)
-{
-}
-
-
/*
* See Porting Layer Definition - p. 18
* This is known as a DeviceProc
@@ -68,7 +60,7 @@ int
winMouseProc (DeviceIntPtr pDeviceInt, int iState)
{
int lngMouseButtons, i;
- int lngWheelEvents = 2;
+ int lngWheelEvents = 4;
CARD8 *map;
DevicePtr pDevice = (DevicePtr) pDeviceInt;
Atom *btn_labels;
@@ -79,7 +71,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
case DEVICE_INIT:
/* Get number of mouse buttons */
lngMouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS);
- winMsg(X_PROBED, "%d mouse buttons found\n", lngMouseButtons);
+ winDebug("%d mouse buttons found\n", lngMouseButtons);
/* Mapping of windows events to X events:
* LEFT:1 MIDDLE:2 RIGHT:3
@@ -107,6 +99,8 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
+ btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
+ btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
@@ -115,7 +109,7 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
map,
lngMouseButtons + lngWheelEvents,
btn_labels,
- winMouseCtrl,
+ (PtrCtrlProcPtr)NoopDDA,
GetMotionHistorySize(),
2,
axes_labels);
@@ -243,10 +237,8 @@ winMouseButtonsSendEvent (int iEventType, int iButton)
QueuePointerEvents(g_pwinPointer, iEventType, iButton,
POINTER_RELATIVE, &mask);
-#if CYGDEBUG
- ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n",
+ winDebug("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n",
iEventType, iButton);
-#endif
}