Index: xorg-server-1.6.3.901/hw/vnc/cursor.c ================================================================================ --- xorg-server-1.7.99/configure.ac +++ xorg-server-1.7.99/configure.ac @@ -1504,7 +1504,7 @@ XVNC_CFLAGS="-DVNCSERVER -DHAVE_XVNC_CONFIG_H" AC_SUBST([XVNC_CFLAGS]) VNC_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" - XVNC_LIBS="$CONFIG_LIB $XSERVER_LIBS $FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" + XVNC_LIBS="$XEXT_LIB $MAIN_LIB $CONFIG_LIB $XSERVER_LIBS $FB_LIB $MI_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $FIXES_LIB $LIBS" AC_SUBST([XVNC_LIBS]) if test "x$GLX" = xyes; then --- xorg-server-1.7.99/hw/vnc/cursor.c +++ xorg-server-1.7.99/hw/vnc/cursor.c @@ -33,6 +33,7 @@ #include "sprite.h" #include "cursorstr.h" #include "servermd.h" +#include "inputstr.h" /* Copied from Xvnc/lib/font/util/utilbitmap.c */ @@ -262,7 +263,7 @@ #if XFREE86VNC if (pScreen == pCursorScreen) - miPointerPosition(&x, &y); + miPointerGetPosition(inputInfo.pointer, &x, &y); #else rfbSpriteGetCursorPos(pScreen, &x, &y); #endif --- xorg-server-1.7.99/hw/vnc/cutpaste.c +++ xorg-server-1.7.99/hw/vnc/cutpaste.c @@ -66,7 +66,7 @@ event.u.selectionClear.time = GetTimeInMillis(); event.u.selectionClear.window = pSel->window; event.u.selectionClear.atom = pSel->selection; - (void) TryClientEvents (pSel->client, &event, 1, + (void) TryClientEvents (pSel->client, NULL, &event, 1, NoEventMask, NoEventMask /* CantBeFiltered */, NullGrab); } --- xorg-server-1.7.99/hw/vnc/dispcur.c +++ xorg-server-1.7.99/hw/vnc/dispcur.c @@ -74,7 +74,10 @@ /* per-screen private data */ -static DevPrivateKey rfbDCScreenKey = &rfbDCScreenKey; +static int rfbDCScreenKeyStore; +static DevPrivateKey rfbDCScreenKey = &rfbDCScreenKeyStore; +static int rfbScreenKeyStore; +static DevPrivateKey rfbScreenKey = &rfbScreenKeyStore; static Bool rfbDCCloseScreen(int index, ScreenPtr pScreen); @@ -205,7 +208,7 @@ CursorPtr pCursor; { if (pCursor->bits->refcnt <= 1) - dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL); + dixSetPrivate(&pCursor->bits->devPrivates, rfbScreenKey, NULL); return TRUE; } @@ -303,7 +306,7 @@ xfree ((pointer) pPriv); return (rfbDCCursorPtr)NULL; } - dixSetPrivate(&pCursor->bits->devPrivates, pScreen, pPriv); + dixSetPrivate(&pCursor->bits->devPrivates, rfbScreenKey, pPriv); return pPriv; } pPriv->pPicture = 0; @@ -321,7 +324,7 @@ xfree ((pointer) pPriv); return (rfbDCCursorPtr)NULL; } - dixSetPrivate(&pCursor->bits->devPrivates, pScreen, pPriv); + dixSetPrivate(&pCursor->bits->devPrivates, rfbScreenKey, pPriv); /* create the two sets of bits, clipping as appropriate */ @@ -368,7 +371,7 @@ rfbDCCursorPtr pPriv; pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, - pScreen); + rfbScreenKey); if (pPriv && (pCursor->bits->refcnt <= 1)) { if (pPriv->sourceBits) @@ -380,7 +383,7 @@ FreePicture (pPriv->pPicture, 0); #endif xfree ((pointer) pPriv); - dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL); + dixSetPrivate(&pCursor->bits->devPrivates, rfbScreenKey, NULL); } return TRUE; } @@ -439,7 +442,7 @@ WindowPtr pWin; pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, - pScreen); + rfbScreenKey); if (!pPriv) { pPriv = rfbDCRealize(pScreen, pCursor); @@ -690,7 +693,7 @@ PixmapPtr pTemp; pPriv = (rfbDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, - pScreen); + rfbScreenKey); if (!pPriv) { pPriv = rfbDCRealize(pScreen, pCursor); --- xorg-server-1.7.99/hw/vnc/init.c +++ xorg-server-1.7.99/hw/vnc/init.c @@ -90,6 +90,7 @@ #include "dix.h" #include "micmap.h" #include "rfb.h" +#include "xserver-properties.h" #ifdef CORBA #include @@ -138,7 +139,7 @@ static void -PointerWarpCursor(ScreenPtr pScreen, int x, int y) +PointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { #if 0 DeviceIntPtr pDev = NULL; @@ -775,8 +776,8 @@ char *argv[]; { DeviceIntPtr p, k; - k = AddInputDevice(rfbKeybdProc, TRUE); - p = AddInputDevice(rfbMouseProc, TRUE); + k = AddInputDevice(serverClient, rfbKeybdProc, TRUE); + p = AddInputDevice(serverClient, rfbMouseProc, TRUE); RegisterKeyboardDevice(k); RegisterPointerDevice(p); @@ -804,7 +805,7 @@ case DEVICE_INIT: vncSetKeyboardDevice(pDevice); KbdDeviceInit(pDevice, &keySyms, modMap); - InitKeyboardDeviceStruct(pDev, &keySyms, modMap, + InitKeyboardDeviceStruct(pDevice, NULL, (BellProcPtr)rfbSendBell, (KbdCtrlProcPtr)NoopDDA); break; @@ -831,6 +832,8 @@ int onoff; { BYTE map[6]; + Atom btn_labels[5] = {0}; + Atom axes_labels[2] = {0}; DevicePtr pDev = (DevicePtr)pDevice; switch (onoff) @@ -842,10 +845,16 @@ map[3] = 3; map[4] = 4; map[5] = 5; - InitPointerDeviceStruct(pDev, map, 5, - GetMotionHistory, + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + InitPointerDeviceStruct(pDev, map, 5, btn_labels, PtrDeviceControl, - GetMaximumEventsNum(), 2 /* numAxes */); + GetMaximumEventsNum(), 2 /* numAxes */, axes_labels); vncSetPointerDevice(pDevice); break; --- xorg-server-1.7.99/hw/vnc/kbdptr.c +++ xorg-server-1.7.99/hw/vnc/kbdptr.c @@ -39,6 +39,7 @@ #include "mi.h" #include "mipointer.h" #include "keyboard.h" +#include "xkbsrv.h" #ifdef DMXVNC #include "dmxinput.h" @@ -69,15 +70,16 @@ ptrDevice = ptr; } - #ifndef DMXVNC static void EnqueueMotion(DeviceIntPtr ptrDev, int x, int y) { - xEvent *events = (xEvent*) calloc(sizeof(xEvent), GetMaximumEventsNum()); int detail = 0, valuators[2], nevents, i; + EventListPtr events; valuators[0] = x; valuators[1] = y; + GetEventList(&events); + if (!ptrDev) { ErrorF("VNC: In EnqueueMotion() ptrDev=NULL\n"); return; @@ -85,8 +87,7 @@ nevents = GetPointerEvents(events, ptrDev, MotionNotify, detail, POINTER_ABSOLUTE, 0, 2, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(ptrDev, events + i); - free(events); + mieqEnqueue(ptrDev, (InternalEvent*)(events + i)->event); } #endif @@ -94,8 +95,10 @@ static void EnqueueButton(DeviceIntPtr ptrDev, int type, int detail) { - xEvent *events = (xEvent*) calloc(sizeof(xEvent), GetMaximumEventsNum()); int nevents, i; + EventListPtr events; + GetEventList(&events); + if (!ptrDev) { ErrorF("VNC: In EnqueueButton() ptrDev=NULL\n"); return; @@ -103,27 +106,26 @@ nevents = GetPointerEvents(events, ptrDev, type, detail, POINTER_ABSOLUTE, 0, 0, NULL/*valuators*/); for (i = 0; i < nevents; i++) - mieqEnqueue(ptrDev, events + i); - free(events); + mieqEnqueue(ptrDev, (InternalEvent*)(events + i)->event); } static void EnqueueKey(DeviceIntPtr kbdDev, int type, int detail) { - xEvent *events = (xEvent*) calloc(sizeof(xEvent), GetMaximumEventsNum()); int nevents, i; + EventListPtr events; + GetEventList(&events); + if (!kbdDev) { ErrorF("VNC: In EnqueueKey() kbdDev=NULL\n"); return; } nevents = GetKeyboardEvents(events, kbdDev, type, detail); for (i = 0; i < nevents; i++) - mieqEnqueue(kbdDev, events + i); - free(events); + mieqEnqueue(kbdDev, (InternalEvent*)(events + i)->event); } - /* * Called when the rfbserver receives a rfbKeyEvent event from a client. * Put an X keyboard event into the event queue. @@ -133,6 +135,7 @@ { const int type = down ? KeyPress : KeyRelease; KeySymsPtr keySyms; + XkbStateRec *xkb; int i; int keyCode = 0; int freeIndex = -1; @@ -145,7 +148,7 @@ if (!kbdDevice) return; - keySyms = &kbdDevice->key->curKeySyms; + keySyms = XkbGetCoreMap(kbdDevice); #ifdef CORBA if (cl) { @@ -256,18 +259,19 @@ shiftMustBePressed = TRUE; } - SendMappingNotify(MappingKeyboard, keyCode, 1, serverClient); + XkbApplyMappingChange(kbdDevice, keySyms, keyCode, 1, NULL, serverClient); ErrorF("KbdAddEvent: unknown KeySym 0x%x - allocating KeyCode %d\n", (int)keySym, keyCode); } + xkb = &kbdDevice->key->xkbInfo->state; if (down) { - if (shiftMustBePressed && !(kbdDevice->key->state & ShiftMask)) { + if (shiftMustBePressed && !(XkbStateFieldFromRec(xkb) & ShiftMask)) { fakeShiftPress = TRUE; EnqueueKey(kbdDevice, KeyPress, SHIFT_L_KEY_CODE); } - if (shiftMustBeReleased && (kbdDevice->key->state & ShiftMask)) { + if (shiftMustBeReleased && (XkbStateFieldFromRec(xkb) & ShiftMask)) { if (KEY_IS_PRESSED(SHIFT_L_KEY_CODE)) { fakeShiftLRelease = TRUE; EnqueueKey(kbdDevice, KeyRelease, SHIFT_L_KEY_CODE); --- xorg-server-1.7.99/hw/vnc/rdp.c +++ xorg-server-1.7.99/hw/vnc/rdp.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "rfb.h" typedef struct rdpClientRec { --- xorg-server-1.7.99/hw/vnc/rfbkeyb.c +++ xorg-server-1.7.99/hw/vnc/rfbkeyb.c @@ -147,7 +147,7 @@ #ifdef XKB if (noXkbExtension) { #endif - InitKeyboardDeviceStruct(pDev, &keySyms, modMap, + InitKeyboardDeviceStruct(device, NULL, (BellProcPtr)rfbSendBell, (KbdCtrlProcPtr)NoopDDA); #ifdef XKB @@ -388,7 +388,7 @@ "xf4vnc Project, see http://xf4vnc.sf.net", MODINFOSTRING1, MODINFOSTRING2, - XF86_VERSION_CURRENT, + XORG_VERSION_CURRENT, 1, 0, 0, ABI_CLASS_XINPUT, ABI_XINPUT_VERSION, --- xorg-server-1.7.99/hw/vnc/rfbmouse.c +++ xorg-server-1.7.99/hw/vnc/rfbmouse.c @@ -51,7 +51,7 @@ #include #endif #include "rfb.h" - +#include "xserver-properties.h" unsigned char ptrAcceleration = 50; @@ -95,13 +95,18 @@ { BYTE map[6]; DevicePtr pDev = (DevicePtr)device; + Atom btn_labels[5] = {0}; + Atom axes_labels[2] = {0}; + void *func1; int (*func2)(void); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 if (LoaderSymbol("GetMotionHistory")) func1 = LoaderSymbol("GetMotionHistory"); else func1 = LoaderSymbol("miPointerGetMotionEvents"); +#endif if (LoaderSymbol("GetMotionHistorySize")) func2 = LoaderSymbol("GetMotionHistorySize"); @@ -119,10 +124,21 @@ map[3] = 3; map[4] = 4; map[5] = 5; - InitPointerDeviceStruct(pDev, map, 5, + btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); + btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); + 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); + + axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); + + InitPointerDeviceStruct(pDev, map, 5, btn_labels, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 func1, +#endif PtrDeviceControl, - (*func2)(), 2); + (*func2)(), 2, axes_labels); break; case DEVICE_ON: @@ -243,7 +259,7 @@ "xf4vnc Project, see http://xf4vnc.sf.net", MODINFOSTRING1, MODINFOSTRING2, - XF86_VERSION_CURRENT, + XORG_VERSION_CURRENT, 1, 0, 0, ABI_CLASS_XINPUT, ABI_XINPUT_VERSION, --- xorg-server-1.7.99/hw/vnc/rfbserver.c +++ xorg-server-1.7.99/hw/vnc/rfbserver.c @@ -53,6 +53,7 @@ #include "propertyst.h" #include #include +#include #ifdef CORBA #include @@ -1122,8 +1123,8 @@ { int x, y; - miPointerPosition(&x, &y); /*XXX deprecated*/ - (*pVNC->spriteFuncs->SetCursor)(cl->pScreen, pVNC->pCurs, x, y); + miPointerGetPosition(inputInfo.pointer, &x, &y); + (*pVNC->spriteFuncs->SetCursor)(inputInfo.pointer, cl->pScreen, pVNC->pCurs, x, y); } #endif --- xorg-server-1.7.99/hw/vnc/sprite.c +++ xorg-server-1.7.99/hw/vnc/sprite.c @@ -112,7 +112,8 @@ static RegionPtr rfbSpriteRestoreAreas(WindowPtr pWin, RegionPtr pRgnExposed); static void rfbSpriteComputeSaved(ScreenPtr pScreen); -static DevPrivateKey rfbSpriteScreenKey = &rfbSpriteScreenKey; +static int rfbSpriteScreenKeyStore; +static DevPrivateKey rfbSpriteScreenKey = &rfbSpriteScreenKeyStore; #define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \ ((rfbSpriteScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ @@ -144,7 +145,8 @@ rfbSpriteCopyClip, }; -static DevPrivateKey rfbSpriteGCKey = &rfbSpriteGCKey; +static int rfbSpriteGCKeyStore; +static DevPrivateKey rfbSpriteGCKey = &rfbSpriteGCKeyStore; #define GC_FUNC_PROLOGUE(pGC) \ rfbSpriteGCPtr pGCPriv = \ @@ -289,23 +291,27 @@ * pointer-sprite method table */ -static Bool rfbSpriteRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor); -static Bool rfbSpriteUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor); -static void rfbSpriteSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y); -static void rfbSpriteMoveCursor (ScreenPtr pScreen, int x, int y); +static Bool rfbSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); +static Bool rfbSpriteUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); +static void rfbSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y); +static void rfbSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); +static Bool rfbSpriteInitializeCursor (DeviceIntPtr pDev, ScreenPtr pScreen); +static void rfbSpriteCleanupCursor (DeviceIntPtr pDev, ScreenPtr pScreen); miPointerSpriteFuncRec rfbSpritePointerFuncs = { rfbSpriteRealizeCursor, rfbSpriteUnrealizeCursor, rfbSpriteSetCursor, rfbSpriteMoveCursor, + rfbSpriteInitializeCursor, + rfbSpriteCleanupCursor, }; /* * other misc functions */ -static Bool rfbDisplayCursor (ScreenPtr pScreen, CursorPtr pCursor); +static Bool rfbDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); /* @@ -1963,7 +1969,7 @@ #define SPRITE_PAD 8 static Bool -rfbSpriteRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +rfbSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { rfbSpriteScreenPtr pScreenPriv; @@ -1975,7 +1981,7 @@ } static Bool -rfbSpriteUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +rfbSpriteUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { rfbSpriteScreenPtr pScreenPriv; @@ -1985,7 +1991,7 @@ } static void -rfbSpriteSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +rfbSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { rfbSpriteScreenPtr pScreenPriv; rfbClientPtr cl, nextCl; @@ -2101,13 +2107,24 @@ } static void -rfbSpriteMoveCursor (ScreenPtr pScreen, int x, int y) +rfbSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { rfbSpriteScreenPtr pScreenPriv; pScreenPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, rfbSpriteScreenKey); - rfbSpriteSetCursor (pScreen, pScreenPriv->pCursor, x, y); + rfbSpriteSetCursor (pDev, pScreen, pScreenPriv->pCursor, x, y); +} + +static Bool +rfbSpriteInitializeCursor (DeviceIntPtr pDev, ScreenPtr pScreen) +{ + return TRUE; +} + +static void +rfbSpriteCleanupCursor (DeviceIntPtr pDev, ScreenPtr pScreen) +{ } /* @@ -2215,9 +2232,7 @@ */ static Bool -rfbDisplayCursor(pScreen, pCursor) - ScreenPtr pScreen; - CursorPtr pCursor; +rfbDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { rfbClientPtr cl; rfbSpriteScreenPtr pPriv; @@ -2230,7 +2245,7 @@ pPriv = (rfbSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, rfbSpriteScreenKey); - status = (*pPriv->DisplayCursor)(pScreen, pCursor); + status = (*pPriv->DisplayCursor)(pDev, pScreen, pCursor); /* send new cursor shape to interested viewers */ for (cl = rfbClientHead; cl ; cl = cl->next) { --- xorg-server-1.7.99/hw/vnc/vncext.c +++ xorg-server-1.7.99/hw/vnc/vncext.c @@ -36,8 +36,9 @@ #include #include -DevPrivateKey vncCreateScreenResourcesKey = &vncCreateScreenResourcesKey; -DevPrivateKey rfbGCKey = &rfbGCKey; +static int vncCreateScreenResourcesKeyStore, rfbGCKeyStore; +DevPrivateKey vncCreateScreenResourcesKey = &vncCreateScreenResourcesKeyStore; +DevPrivateKey rfbGCKey = &rfbGCKeyStore; int VncSelectNotify(ClientPtr client, BOOL onoff); void VncExtensionInit(void); @@ -514,7 +515,7 @@ else conn.ipaddress = (CARD32)peer.sin_addr.s_addr; - (void) TryClientEvents(pn->client, (xEventPtr)&conn, 1, NoEventMask, + (void) TryClientEvents(pn->client, NULL, (xEventPtr)&conn, 1, NoEventMask, NoEventMask, NullGrab); } pn = pn->next; @@ -557,7 +558,7 @@ else conn.ipaddress = (CARD32)peer.sin_addr.s_addr; - (void) TryClientEvents(pn->client, (xEventPtr)&conn, 1, NoEventMask, + (void) TryClientEvents(pn->client, NULL, (xEventPtr)&conn, 1, NoEventMask, NoEventMask, NullGrab); } pn = pn->next; @@ -586,7 +587,7 @@ conn.type = VncEventBase + XVncDisconnected; conn.sequenceNumber = pn->client->sequence; conn.connected = sock; - (void) TryClientEvents(pn->client, (xEventPtr)&conn, 1, NoEventMask, + (void) TryClientEvents(pn->client, NULL, (xEventPtr)&conn, 1, NoEventMask, NoEventMask, NullGrab); } pn = pn->next; --- xorg-server-1.7.99/hw/xfree86/vnc/vncInit.c +++ xorg-server-1.7.99/hw/xfree86/vnc/vncInit.c @@ -34,8 +34,7 @@ #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Resources.h" -#include "xf86Version.h" +#include "xorgVersion.h" int vncScreenPrivateIndex = -1; int inetdSock = -1; @@ -48,6 +47,8 @@ extern void VncExtensionInit(void); +extern void vncInitMouse(void); +extern void vncInitKeyb(void); Bool VNCInit(ScreenPtr pScreen, unsigned char *FBStart); #ifndef XFree86LOADER @@ -56,11 +57,11 @@ static const OptionInfoRec *VNCAvailableOptions(void *unused); static void rfbWakeupHandler (int i, pointer blockData, unsigned long err, pointer pReadmask); -static Bool vncCursorRealizeCursor(ScreenPtr, CursorPtr); -static Bool vncCursorUnrealizeCursor(ScreenPtr, CursorPtr); -static void vncCursorSetCursor(ScreenPtr, CursorPtr, int, int); -static void vncCursorMoveCursor(ScreenPtr, int, int); -static Bool vncDisplayCursor(ScreenPtr, CursorPtr); +static Bool vncCursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); +static Bool vncCursorUnrealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); +static void vncCursorSetCursor(DeviceIntPtr, ScreenPtr, CursorPtr, int, int); +static void vncCursorMoveCursor(DeviceIntPtr, ScreenPtr, int, int); +static Bool vncDisplayCursor(DeviceIntPtr, ScreenPtr, CursorPtr); static miPointerSpriteFuncRec vncCursorSpriteFuncs = { vncCursorRealizeCursor, @@ -389,23 +390,23 @@ /****** miPointerSpriteFunctions *******/ static Bool -vncCursorRealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) +vncCursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs) { vncScreenPtr pScreenPriv = VNCPTR(pScreen); - return (*pScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCurs); + return (*pScreenPriv->spriteFuncs->RealizeCursor)(pDev, pScreen, pCurs); } static Bool -vncCursorUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) +vncCursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs) { vncScreenPtr pScreenPriv = VNCPTR(pScreen); - return (*pScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCurs); + return (*pScreenPriv->spriteFuncs->UnrealizeCursor)(pDev, pScreen, pCurs); } static void -vncCursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) +vncCursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, int x, int y) { vncScreenPtr pScreenPriv = VNCPTR(pScreen); @@ -426,11 +427,11 @@ pScreenPriv->cursorIsDrawn = TRUE; #endif - (*pScreenPriv->spriteFuncs->SetCursor)(pScreen, pCurs, x, y); + (*pScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, pCurs, x, y); } static void -vncCursorMoveCursor(ScreenPtr pScreen, int x, int y) +vncCursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { vncScreenPtr pScreenPriv = VNCPTR(pScreen); rfbClientPtr cl; @@ -440,7 +441,7 @@ cl->cursorWasMoved = TRUE; } - (*pScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); + (*pScreenPriv->spriteFuncs->MoveCursor)(pDev, pScreen, x, y); } Bool @@ -505,9 +506,7 @@ #endif static Bool -vncDisplayCursor(pScreen, pCursor) - ScreenPtr pScreen; - CursorPtr pCursor; +vncDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { vncScreenPtr pScreenPriv = VNCPTR(pScreen); rfbClientPtr cl; @@ -520,7 +519,7 @@ cl->cursorWasChanged = TRUE; } - ret = (*pScreen->DisplayCursor)(pScreen, pCursor); + ret = (*pScreen->DisplayCursor)(pDev, pScreen, pCursor); pScreen->DisplayCursor = vncDisplayCursor; @@ -586,6 +585,7 @@ NULL /* ModuleTearDownProc */ }; +#if 0 ModuleInfoRec VNC = { 1, /* moduleVersion */ "VNC", /* moduleName */ @@ -593,6 +593,7 @@ 0, /* refCount */ VNCAvailableOptions, /* function returning array of OptionsInfoRec */ }; +#endif ExtensionModule vncExtensionModule = { VncExtensionInit, /* initFunc */