#ifdef XKB
#include <xkbsrv.h>
#endif
-#ifdef XORG_16
+#if XORG >= 16
#include "exevents.h"
extern void
CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
static DeviceIntPtr vncKeyboardDevice = NULL;
static DeviceIntPtr vncPointerDevice = NULL;
-#ifdef XORG_15
+#if XORG == 15
static xEvent *eventq = NULL;
#else
static EventList *eventq = NULL;
if (httpListener)
httpServer = new FileHTTPServer(this);
-#ifdef XORG_15
+#if XORG == 15
/*
* XXX eventq is never free()-ed because it has to exist during server life
* */
*/
if (vncKeyboardDevice == NULL) {
vncKeyboardDevice = AddInputDevice(
-#ifdef XORG_16
+#if XORG >= 16
serverClient,
#endif
vfbKeybdProc, TRUE);
if (vncPointerDevice == NULL) {
vncPointerDevice = AddInputDevice(
-#ifdef XORG_16
+#if XORG >= 16
serverClient,
#endif
vfbMouseProc, TRUE);
if (!cursorPos.equals(oldCursorPos)) {
oldCursorPos = cursorPos;
(*pScreen->SetCursorPosition) (
-#ifdef XORG_16
+#if XORG >= 16
vncPointerDevice,
#endif
pScreen, cursorPos.x, cursorPos.y, FALSE);
void XserverDesktop::blockHandler(fd_set* fds)
{
try {
-#ifdef XORG_15
+#if XORG == 15
ScreenPtr screenWithCursor = GetCurrentRootWindow()->drawable.pScreen;
#else
ScreenPtr screenWithCursor =
if (screenWithCursor == pScreen) {
int x, y;
GetSpritePosition(
-#ifdef XORG_16
+#if XORG >= 16
vncPointerDevice,
#endif
&x, &y);
//(*pScreen->SetCursorPosition) (pScreen, pos.x, pos.y, FALSE);
NewCurrentScreen(
-#ifdef XORG_16
+#if XORG >= 16
vncPointerDevice,
#endif
pScreen, pos.x, pos.y);
valuators[0] = pos.x;
valuators[1] = pos.y;
-#ifdef XORG_16
+#if XORG >= 16
GetEventList(&eventq);
#endif
n = GetPointerEvents (eventq, vncPointerDevice, MotionNotify, 0,
for (i = 0; i < n; i++) {
mieqEnqueue (vncPointerDevice,
-#ifdef XORG_15
+#if XORG == 15
eventq + i
#else
(eventq + i)->event
for (j = 0; j < n; j++) {
mieqEnqueue (vncPointerDevice,
-#ifdef XORG_15
+#if XORG == 15
eventq + j
#else
(eventq + j)->event
RRModePtr mode;
// Make sure all RandR tables are properly populated
-#ifdef XORG_15
+#if XORG == 15
ret = RRGetInfo(pScreen);
#else
ret = RRGetInfo(pScreen, FALSE);
// Then we have to call RRGetInfo again for it to copy the RandR
// 1.0 information to the 1.2 structures.
-#ifdef XORG_15
+#if XORG == 15
ret = RRGetInfo(pScreen);
#else
ret = RRGetInfo(pScreen, FALSE);
down ? KeyPress : KeyRelease, keycode);
for (i = 0; i < n; i++) {
mieqEnqueue (vncKeyboardDevice,
-#ifdef XORG_15
+#if XORG == 15
eventq + i
#else
(eventq + i)->event
vlog.info("Added unknown keysym 0x%x to keycode %d",keysym,kc);
-#ifdef XORG_15
+#if XORG == 15
master = inputInfo.keyboard;
#else
master = vncKeyboardDevice->u.master;
if (vncKeyboardDevice ==
dixLookupPrivate(&master->devPrivates, CoreDevicePrivateKey)) {
dixSetPrivate(&master->devPrivates, CoreDevicePrivateKey, NULL);
-#ifdef XORG_15
+#if XORG == 15
SwitchCoreKeyboard(vncKeyboardDevice);
#else
CopyKeyClass(vncKeyboardDevice, master);
KeyPress : KeyRelease, kc);
for (i = 0; i < n; i++) {
mieqEnqueue (vncKeyboardDevice,
-#ifdef XORG_15
+#if XORG == 15
eventq + i
#else
(eventq + i)->event
map[4] = 4;
map[5] = 5;
InitPointerDeviceStruct(pDev, map, 5,
-#ifdef XORG_15
+#if XORG == 15
GetMotionHistory,
#endif
(PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2);
GCOps *wrappedOps;
} vncHooksGCRec, *vncHooksGCPtr;
-#ifdef XORG_15
+#if XORG == 15
static DevPrivateKey vncHooksScreenPrivateKey = &vncHooksScreenPrivateKey;
static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey;
#else
static void vncHooksStoreColors(ColormapPtr pColormap, int ndef,
xColorItem* pdef);
static Bool vncHooksDisplayCursor(
-#ifdef XORG_16
+#if XORG >= 16
DeviceIntPtr pDev,
#endif
ScreenPtr pScreen, CursorPtr cursor);
// DisplayCursor - get the cursor shape
static Bool vncHooksDisplayCursor(
-#ifdef XORG_16
+#if XORG >= 16
DeviceIntPtr pDev,
#endif
ScreenPtr pScreen_, CursorPtr cursor)
SCREEN_UNWRAP(pScreen_, DisplayCursor);
Bool ret = (*pScreen->DisplayCursor) (
-#ifdef XORG_16
+#if XORG >= 16
pDev,
#endif
pScreen, cursor);
-#ifdef XORG_16
+#if XORG >= 16
/*
* XXX DIX calls this function with NULL argument to remove cursor sprite from
* screen. Should we handle this in setCursor as well?
if (cursor != NullCursor) {
#endif
vncHooksScreen->desktop->setCursor(cursor);
-#ifdef XORG_16
+#if XORG >= 16
}
#endif
}
static Bool vfbRealizeCursor(
-#ifdef XORG_16
+#if XORG >= 16
DeviceIntPtr pDev,
#endif
ScreenPtr pScreen, CursorPtr pCursor) {
}
static Bool vfbUnrealizeCursor(
-#ifdef XORG_16
+#if XORG >= 16
DeviceIntPtr pDev,
#endif
ScreenPtr pScreen, CursorPtr pCursor) {
}
static void vfbSetCursor(
-#ifdef XORG_16
+#if XORG >= 16
DeviceIntPtr pDev,
#endif
ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
}
static void vfbMoveCursor(
-#ifdef XORG_16
+#if XORG >= 16
DeviceIntPtr pDev,
#endif
ScreenPtr pScreen, int x, int y)
{
}
-#ifdef XORG_16
+#if XORG >= 16
static Bool
vfbDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
{
vfbUnrealizeCursor,
vfbSetCursor,
vfbMoveCursor
-#ifdef XORG_16
+#if XORG >= 16
, vfbDeviceCursorInitialize,
vfbDeviceCursorCleanup
#endif
void ProcessInputEvents()
{
mieqProcessInputEvents();
-#ifdef XORG_15
+#if XORG == 15
miPointerUpdate();
#endif
}