#undef class
}
+DeviceIntPtr vncKeyboardDevice = NULL;
+DeviceIntPtr vncPointerDevice = NULL;
+
+static int vfbKeybdProc(DeviceIntPtr pDevice, int onoff);
+static int vfbMouseProc(DeviceIntPtr pDevice, int onoff);
+
using namespace rfb;
using namespace network;
if (httpListener)
httpServer = new FileHTTPServer(this);
+
+ if (vncKeyboardDevice == NULL) {
+ vncKeyboardDevice = AddInputDevice(vfbKeybdProc, TRUE);
+ RegisterKeyboardDevice(vncKeyboardDevice);
+ }
+
+ if (vncPointerDevice == NULL) {
+ vncPointerDevice = AddInputDevice(vfbMouseProc, TRUE);
+ RegisterPointerDevice(vncPointerDevice);
+ }
}
XserverDesktop::~XserverDesktop()
map[3] = 3;
map[4] = 4;
map[5] = 5;
- InitPointerDeviceStruct(pDev, map, 5, miPointerGetMotionEvents,
- (PtrCtrlProcPtr)NoopDDA, miPointerGetMotionBufferSize());
+ InitPointerDeviceStruct(pDev, map, 5, GetMotionHistory,
+ (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2);
break;
case DEVICE_ON:
void InitInput(int argc, char *argv[])
{
- DeviceIntPtr p, k;
- p = AddInputDevice(vfbMouseProc, TRUE);
- k = AddInputDevice(vfbKeybdProc, TRUE);
- RegisterPointerDevice(p);
- RegisterKeyboardDevice(k);
- miRegisterPointerDevice(screenInfo.screens[0], p);
- (void)mieqInit ((DevicePtr)k, (DevicePtr)p);
+ mieqInit ();
}