summaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/XserverDesktop.cc
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2008-03-26 17:13:33 +0000
committerAdam Tkac <atkac@redhat.com>2008-03-26 17:13:33 +0000
commitfbeb0ed67e443a55c55971d8f87b55fe1f6cef3e (patch)
treef71b11840060faae7923055d8fc085f2342cc863 /unix/xserver/hw/vnc/XserverDesktop.cc
parent7702c9774c07f5e2b8048e34baf08e9f29bdd7f3 (diff)
downloadtigervnc-fbeb0ed67e443a55c55971d8f87b55fe1f6cef3e.tar.gz
tigervnc-fbeb0ed67e443a55c55971d8f87b55fe1f6cef3e.zip
Initialize input devices in XserverDesktop constructor and update
InitPointerDeviceStruct and mieqInit parameters. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2448 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver/hw/vnc/XserverDesktop.cc')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 7071b714..6dfe3d5c 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -56,6 +56,12 @@ extern char *display;
#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;
@@ -202,6 +208,16 @@ XserverDesktop::XserverDesktop(ScreenPtr pScreen_,
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()
@@ -1335,8 +1351,8 @@ static int vfbMouseProc(DeviceIntPtr pDevice, int onoff)
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: