xorg-source-stamp: $(XORG_SOURCE_ARCHIVE) | xorg-source-stamp: $(XORG_SOURCE_ARCHIVE) | ||||
tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | ||||
cd unix/xserver && patch -p1 < ../xserver119.patch | cd unix/xserver && patch -p1 < ../xserver119.patch | ||||
patch -p1 < debian/xorg-source-patches/100_rethrow_signals.patch | |||||
patch -p1 < debian/xorg-source-patches/516_tigervnc-xorg-manpages.patch | patch -p1 < debian/xorg-source-patches/516_tigervnc-xorg-manpages.patch | ||||
touch xorg-source-stamp | touch xorg-source-stamp | ||||
diff -up tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c.orig tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c | |||||
--- tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c.orig 2020-04-02 11:18:00.000000000 +0200 | |||||
+++ tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c 2020-04-02 12:44:06.365607230 +0200 | |||||
@@ -229,11 +229,17 @@ void ddxGiveUp(enum ExitCode error) | |||||
} | |||||
void | |||||
-AbortDDX(enum ExitCode error) | |||||
+SigAbortDDX(int signo, enum ExitCode error) | |||||
{ | |||||
ddxGiveUp(error); | |||||
} | |||||
+void | |||||
+AbortDDX(enum ExitCode error) | |||||
+{ | |||||
+ SigAbortDDX(0, error); | |||||
+} | |||||
+ | |||||
#ifdef __DARWIN__ | |||||
void | |||||
DarwinHandleGUI(int argc, char *argv[]) |
xorg-source-stamp: $(XORG_SOURCE_ARCHIVE) | xorg-source-stamp: $(XORG_SOURCE_ARCHIVE) | ||||
tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | ||||
cd unix/xserver && patch -p1 < ../xserver120.patch | cd unix/xserver && patch -p1 < ../xserver120.patch | ||||
patch -p1 < debian/xorg-source-patches/100_rethrow_signals.patch | |||||
patch -p1 < debian/xorg-source-patches/516_tigervnc-xorg-manpages.patch | patch -p1 < debian/xorg-source-patches/516_tigervnc-xorg-manpages.patch | ||||
touch xorg-source-stamp | touch xorg-source-stamp | ||||
diff -up tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c.orig tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c | |||||
--- tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c.orig 2020-04-02 11:18:00.000000000 +0200 | |||||
+++ tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c 2020-04-02 12:44:06.365607230 +0200 | |||||
@@ -229,11 +229,17 @@ void ddxGiveUp(enum ExitCode error) | |||||
} | |||||
void | |||||
-AbortDDX(enum ExitCode error) | |||||
+SigAbortDDX(int signo, enum ExitCode error) | |||||
{ | |||||
ddxGiveUp(error); | |||||
} | |||||
+void | |||||
+AbortDDX(enum ExitCode error) | |||||
+{ | |||||
+ SigAbortDDX(0, error); | |||||
+} | |||||
+ | |||||
#ifdef __DARWIN__ | |||||
void | |||||
DarwinHandleGUI(int argc, char *argv[]) |
tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | ||||
patch -p1 < debian/xorg-source-patches/xserver118-patch.patch | patch -p1 < debian/xorg-source-patches/xserver118-patch.patch | ||||
cd unix/xserver && patch -p1 < ../xserver118.patch | cd unix/xserver && patch -p1 < ../xserver118.patch | ||||
patch -p1 < debian/xorg-source-patches/100_rethrow_signals.patch | |||||
patch -p1 < debian/xorg-source-patches/516_tigervnc-xorg-manpages.patch | patch -p1 < debian/xorg-source-patches/516_tigervnc-xorg-manpages.patch | ||||
touch xorg-source-stamp | touch xorg-source-stamp | ||||
diff -up tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c.orig tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c | |||||
--- tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c.orig 2020-04-02 11:18:00.000000000 +0200 | |||||
+++ tigervnc-1.10.80/unix/xserver/hw/vnc/xvnc.c 2020-04-02 12:44:06.365607230 +0200 | |||||
@@ -229,11 +229,17 @@ void ddxGiveUp(enum ExitCode error) | |||||
} | |||||
void | |||||
-AbortDDX(enum ExitCode error) | |||||
+SigAbortDDX(int signo, enum ExitCode error) | |||||
{ | |||||
ddxGiveUp(error); | |||||
} | |||||
+void | |||||
+AbortDDX(enum ExitCode error) | |||||
+{ | |||||
+ SigAbortDDX(0, error); | |||||
+} | |||||
+ | |||||
#ifdef __DARWIN__ | |||||
void | |||||
DarwinHandleGUI(int argc, char *argv[]) |
LOG_DEBUG("%s %d %s", msg, kc, down ? "down" : "up"); | LOG_DEBUG("%s %d %s", msg, kc, down ? "down" : "up"); | ||||
action = down ? KeyPress : KeyRelease; | action = down ? KeyPress : KeyRelease; | ||||
#if XORG < 118 | |||||
#if XORG_OLDER_THAN(1, 18, 0) | |||||
QueueKeyboardEvents(dev, action, kc, NULL); | QueueKeyboardEvents(dev, action, kc, NULL); | ||||
#else | #else | ||||
QueueKeyboardEvents(dev, action, kc); | QueueKeyboardEvents(dev, action, kc); | ||||
*/ | */ | ||||
mieqProcessInputEvents(); | mieqProcessInputEvents(); | ||||
} | } | ||||
#if INPUTTHREAD | |||||
/** This function is called in Xserver/os/inputthread.c when starting | |||||
the input thread. */ | |||||
void | |||||
ddxInputThreadInit(void) | |||||
{ | |||||
} | |||||
#endif |
#define KEYBOARD_OR_FLOAT MASTER_KEYBOARD | #define KEYBOARD_OR_FLOAT MASTER_KEYBOARD | ||||
#endif | #endif | ||||
#if XORG < 118 | |||||
#if XORG_OLDER_THAN(1, 18, 0) | |||||
#define GetMaster(dev, type) ((dev)->master) | #define GetMaster(dev, type) ((dev)->master) | ||||
#endif | #endif | ||||
#include "vncBlockHandler.h" | #include "vncBlockHandler.h" | ||||
#include "xorg-version.h" | #include "xorg-version.h" | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
static void vncBlockHandler(void* data, void* timeout); | static void vncBlockHandler(void* data, void* timeout); | ||||
static void vncSocketNotify(int fd, int xevents, void *data); | static void vncSocketNotify(int fd, int xevents, void *data); | ||||
#else | #else | ||||
void vncRegisterBlockHandlers(void) | void vncRegisterBlockHandlers(void) | ||||
{ | { | ||||
if (!RegisterBlockAndWakeupHandlers(vncBlockHandler, | if (!RegisterBlockAndWakeupHandlers(vncBlockHandler, | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
(ServerWakeupHandlerProcPtr)NoopDDA, | (ServerWakeupHandlerProcPtr)NoopDDA, | ||||
#else | #else | ||||
vncWakeupHandler, | vncWakeupHandler, | ||||
void vncSetNotifyFd(int fd, int scrIdx, int read, int write) | void vncSetNotifyFd(int fd, int scrIdx, int read, int write) | ||||
{ | { | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
int mask = (read ? X_NOTIFY_READ : 0) | (write ? X_NOTIFY_WRITE : 0); | int mask = (read ? X_NOTIFY_READ : 0) | (write ? X_NOTIFY_WRITE : 0); | ||||
SetNotifyFd(fd, vncSocketNotify, mask, (void*)(intptr_t)scrIdx); | SetNotifyFd(fd, vncSocketNotify, mask, (void*)(intptr_t)scrIdx); | ||||
#else | #else | ||||
void vncRemoveNotifyFd(int fd) | void vncRemoveNotifyFd(int fd) | ||||
{ | { | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
RemoveNotifyFd(fd); | RemoveNotifyFd(fd); | ||||
#else | #else | ||||
struct vncFdEntry** prev; | struct vncFdEntry** prev; | ||||
#endif | #endif | ||||
} | } | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
static void vncSocketNotify(int fd, int xevents, void *data) | static void vncSocketNotify(int fd, int xevents, void *data) | ||||
{ | { | ||||
int scrIdx; | int scrIdx; | ||||
} | } | ||||
#endif | #endif | ||||
#if XORG < 119 | |||||
#if XORG_OLDER_THAN(1, 19, 0) | |||||
static void vncWriteBlockHandlerFallback(OSTimePtr timeout); | static void vncWriteBlockHandlerFallback(OSTimePtr timeout); | ||||
static void vncWriteWakeupHandlerFallback(void); | static void vncWriteWakeupHandlerFallback(void); | ||||
void vncWriteBlockHandler(fd_set *fds); | void vncWriteBlockHandler(fd_set *fds); | ||||
// descriptors that we want read events on. | // descriptors that we want read events on. | ||||
// | // | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
static void vncBlockHandler(void* data, void* timeout) | static void vncBlockHandler(void* data, void* timeout) | ||||
#else | #else | ||||
static void vncBlockHandler(void * data, OSTimePtr t, void * readmask) | static void vncBlockHandler(void * data, OSTimePtr t, void * readmask) | ||||
#endif | #endif | ||||
{ | { | ||||
#if XORG < 119 | |||||
#if XORG_OLDER_THAN(1, 19, 0) | |||||
int _timeout; | int _timeout; | ||||
int* timeout = &_timeout; | int* timeout = &_timeout; | ||||
static struct timeval tv; | static struct timeval tv; | ||||
vncCallBlockHandlers(timeout); | vncCallBlockHandlers(timeout); | ||||
#if XORG < 119 | |||||
#if XORG_OLDER_THAN(1, 19, 0) | |||||
if (_timeout != -1) { | if (_timeout != -1) { | ||||
tv.tv_sec= _timeout / 1000; | tv.tv_sec= _timeout / 1000; | ||||
tv.tv_usec = (_timeout % 1000) * 1000; | tv.tv_usec = (_timeout % 1000) * 1000; | ||||
#endif | #endif | ||||
} | } | ||||
#if XORG < 119 | |||||
#if XORG_OLDER_THAN(1, 19, 0) | |||||
static void vncWakeupHandler(void * data, int nfds, void * readmask) | static void vncWakeupHandler(void * data, int nfds, void * readmask) | ||||
{ | { | ||||
fd_set* fds = (fd_set*)readmask; | fd_set* fds = (fd_set*)readmask; | ||||
// modified Xorg and might therefore not be called. | // modified Xorg and might therefore not be called. | ||||
// | // | ||||
#if XORG < 119 | |||||
#if XORG_OLDER_THAN(1, 19, 0) | |||||
static Bool needFallback = TRUE; | static Bool needFallback = TRUE; | ||||
static fd_set fallbackFds; | static fd_set fallbackFds; | ||||
static struct timeval tw; | static struct timeval tw; |
} | } | ||||
} | } | ||||
void vncSetCursor(int width, int height, int hotX, int hotY, | |||||
const unsigned char *rgbaData) | |||||
void vncSetCursorSprite(int width, int height, int hotX, int hotY, | |||||
const unsigned char *rgbaData) | |||||
{ | { | ||||
for (int scr = 0; scr < vncGetScreenCount(); scr++) | for (int scr = 0; scr < vncGetScreenCount(); scr++) | ||||
desktop[scr]->setCursor(width, height, hotX, hotY, rgbaData); | desktop[scr]->setCursor(width, height, hotX, hotY, rgbaData); |
const struct UpdateRect *rects, | const struct UpdateRect *rects, | ||||
int dx, int dy); | int dx, int dy); | ||||
void vncSetCursor(int width, int height, int hotX, int hotY, | |||||
const unsigned char *rgbaData); | |||||
void vncSetCursorSprite(int width, int height, int hotX, int hotY, | |||||
const unsigned char *rgbaData); | |||||
void vncSetCursorPos(int scrIdx, int x, int y); | void vncSetCursorPos(int scrIdx, int x, int y); | ||||
void vncPreScreenResize(int scrIdx); | void vncPreScreenResize(int scrIdx); |
#include "regionstr.h" | #include "regionstr.h" | ||||
#include "dixfontstr.h" | #include "dixfontstr.h" | ||||
#include "colormapst.h" | #include "colormapst.h" | ||||
#ifdef RENDER | |||||
#include "picturestr.h" | #include "picturestr.h" | ||||
#endif | |||||
#include "randrstr.h" | #include "randrstr.h" | ||||
#define DBGPRINT(x) //(fprintf x) | #define DBGPRINT(x) //(fprintf x) | ||||
CopyWindowProcPtr CopyWindow; | CopyWindowProcPtr CopyWindow; | ||||
ClearToBackgroundProcPtr ClearToBackground; | ClearToBackgroundProcPtr ClearToBackground; | ||||
DisplayCursorProcPtr DisplayCursor; | DisplayCursorProcPtr DisplayCursor; | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
CursorWarpedToProcPtr CursorWarpedTo; | CursorWarpedToProcPtr CursorWarpedTo; | ||||
#endif | #endif | ||||
ScreenBlockHandlerProcPtr BlockHandler; | ScreenBlockHandlerProcPtr BlockHandler; | ||||
#ifdef RENDER | |||||
CompositeProcPtr Composite; | CompositeProcPtr Composite; | ||||
GlyphsProcPtr Glyphs; | GlyphsProcPtr Glyphs; | ||||
CompositeRectsProcPtr CompositeRects; | CompositeRectsProcPtr CompositeRects; | ||||
TrianglesProcPtr Triangles; | TrianglesProcPtr Triangles; | ||||
TriStripProcPtr TriStrip; | TriStripProcPtr TriStrip; | ||||
TriFanProcPtr TriFan; | TriFanProcPtr TriFan; | ||||
#endif | |||||
RRSetConfigProcPtr rrSetConfig; | RRSetConfigProcPtr rrSetConfig; | ||||
RRScreenSetSizeProcPtr rrScreenSetSize; | RRScreenSetSizeProcPtr rrScreenSetSize; | ||||
RRCrtcSetProcPtr rrCrtcSet; | RRCrtcSetProcPtr rrCrtcSet; | ||||
int h, Bool generateExposures); | int h, Bool generateExposures); | ||||
static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, | static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, | ||||
ScreenPtr pScreen, CursorPtr cursor); | ScreenPtr pScreen, CursorPtr cursor); | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
static void vncHooksCursorWarpedTo(DeviceIntPtr pDev, | static void vncHooksCursorWarpedTo(DeviceIntPtr pDev, | ||||
ScreenPtr pScreen_, ClientPtr pClient, | ScreenPtr pScreen_, ClientPtr pClient, | ||||
WindowPtr pWindow, SpritePtr pSprite, | WindowPtr pWindow, SpritePtr pSprite, | ||||
int x, int y); | int x, int y); | ||||
#endif | #endif | ||||
#if XORG <= 118 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
static void vncHooksBlockHandler(ScreenPtr pScreen, void * pTimeout); | |||||
#else | |||||
static void vncHooksBlockHandler(ScreenPtr pScreen, void * pTimeout, | static void vncHooksBlockHandler(ScreenPtr pScreen, void * pTimeout, | ||||
void * pReadmask); | void * pReadmask); | ||||
#else | |||||
static void vncHooksBlockHandler(ScreenPtr pScreen, void * pTimeout); | |||||
#endif | #endif | ||||
#ifdef RENDER | |||||
static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, | static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, | ||||
PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, | PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, | ||||
INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); | INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); | ||||
static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, | static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, | ||||
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, | PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, | ||||
int npoint, xPointFixed * points); | int npoint, xPointFixed * points); | ||||
#endif | |||||
static Bool vncHooksRandRSetConfig(ScreenPtr pScreen, Rotation rotation, | static Bool vncHooksRandRSetConfig(ScreenPtr pScreen, Rotation rotation, | ||||
int rate, RRScreenSizePtr pSize); | int rate, RRScreenSizePtr pSize); | ||||
static Bool vncHooksRandRScreenSetSize(ScreenPtr pScreen, | static Bool vncHooksRandRScreenSetSize(ScreenPtr pScreen, | ||||
ScreenPtr pScreen; | ScreenPtr pScreen; | ||||
vncHooksScreenPtr vncHooksScreen; | vncHooksScreenPtr vncHooksScreen; | ||||
#ifdef RENDER | |||||
PictureScreenPtr ps; | PictureScreenPtr ps; | ||||
#endif | |||||
rrScrPrivPtr rp; | rrScrPrivPtr rp; | ||||
pScreen = screenInfo.screens[scrIdx]; | pScreen = screenInfo.screens[scrIdx]; | ||||
wrap(vncHooksScreen, pScreen, CopyWindow, vncHooksCopyWindow); | wrap(vncHooksScreen, pScreen, CopyWindow, vncHooksCopyWindow); | ||||
wrap(vncHooksScreen, pScreen, ClearToBackground, vncHooksClearToBackground); | wrap(vncHooksScreen, pScreen, ClearToBackground, vncHooksClearToBackground); | ||||
wrap(vncHooksScreen, pScreen, DisplayCursor, vncHooksDisplayCursor); | wrap(vncHooksScreen, pScreen, DisplayCursor, vncHooksDisplayCursor); | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
wrap(vncHooksScreen, pScreen, CursorWarpedTo, vncHooksCursorWarpedTo); | wrap(vncHooksScreen, pScreen, CursorWarpedTo, vncHooksCursorWarpedTo); | ||||
#endif | #endif | ||||
wrap(vncHooksScreen, pScreen, BlockHandler, vncHooksBlockHandler); | wrap(vncHooksScreen, pScreen, BlockHandler, vncHooksBlockHandler); | ||||
#ifdef RENDER | |||||
ps = GetPictureScreenIfSet(pScreen); | ps = GetPictureScreenIfSet(pScreen); | ||||
if (ps) { | if (ps) { | ||||
wrap(vncHooksScreen, ps, Composite, vncHooksComposite); | wrap(vncHooksScreen, ps, Composite, vncHooksComposite); | ||||
wrap(vncHooksScreen, ps, TriStrip, vncHooksTriStrip); | wrap(vncHooksScreen, ps, TriStrip, vncHooksTriStrip); | ||||
wrap(vncHooksScreen, ps, TriFan, vncHooksTriFan); | wrap(vncHooksScreen, ps, TriFan, vncHooksTriFan); | ||||
} | } | ||||
#endif | |||||
rp = rrGetScrPriv(pScreen); | rp = rrGetScrPriv(pScreen); | ||||
if (rp) { | if (rp) { | ||||
/* Some RandR callbacks are optional */ | /* Some RandR callbacks are optional */ | ||||
static Bool vncHooksCloseScreen(ScreenPtr pScreen_) | static Bool vncHooksCloseScreen(ScreenPtr pScreen_) | ||||
{ | { | ||||
#ifdef RENDER | |||||
PictureScreenPtr ps; | PictureScreenPtr ps; | ||||
#endif | |||||
rrScrPrivPtr rp; | rrScrPrivPtr rp; | ||||
SCREEN_PROLOGUE(pScreen_, CloseScreen); | SCREEN_PROLOGUE(pScreen_, CloseScreen); | ||||
unwrap(vncHooksScreen, pScreen, ClearToBackground); | unwrap(vncHooksScreen, pScreen, ClearToBackground); | ||||
unwrap(vncHooksScreen, pScreen, DisplayCursor); | unwrap(vncHooksScreen, pScreen, DisplayCursor); | ||||
unwrap(vncHooksScreen, pScreen, BlockHandler); | unwrap(vncHooksScreen, pScreen, BlockHandler); | ||||
#ifdef RENDER | |||||
ps = GetPictureScreenIfSet(pScreen); | ps = GetPictureScreenIfSet(pScreen); | ||||
if (ps) { | if (ps) { | ||||
unwrap(vncHooksScreen, ps, Composite); | unwrap(vncHooksScreen, ps, Composite); | ||||
unwrap(vncHooksScreen, ps, TriStrip); | unwrap(vncHooksScreen, ps, TriStrip); | ||||
unwrap(vncHooksScreen, ps, TriFan); | unwrap(vncHooksScreen, ps, TriFan); | ||||
} | } | ||||
#endif | |||||
rp = rrGetScrPriv(pScreen); | rp = rrGetScrPriv(pScreen); | ||||
if (rp) { | if (rp) { | ||||
unwrap(vncHooksScreen, rp, rrSetConfig); | unwrap(vncHooksScreen, rp, rrSetConfig); | ||||
} | } | ||||
} | } | ||||
vncSetCursor(width, height, hotX, hotY, rgbaData); | |||||
vncSetCursorSprite(width, height, hotX, hotY, rgbaData); | |||||
free(rgbaData); | free(rgbaData); | ||||
} | } | ||||
// CursorWarpedTo - notify that the cursor was warped | // CursorWarpedTo - notify that the cursor was warped | ||||
#if XORG >= 119 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
static void vncHooksCursorWarpedTo(DeviceIntPtr pDev, | static void vncHooksCursorWarpedTo(DeviceIntPtr pDev, | ||||
ScreenPtr pScreen_, ClientPtr pClient, | ScreenPtr pScreen_, ClientPtr pClient, | ||||
WindowPtr pWindow, SpritePtr pSprite, | WindowPtr pWindow, SpritePtr pSprite, | ||||
// BlockHandler - ignore any changes during the block handler - it's likely | // BlockHandler - ignore any changes during the block handler - it's likely | ||||
// these are just drawing the cursor. | // these are just drawing the cursor. | ||||
#if XORG <= 118 | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
static void vncHooksBlockHandler(ScreenPtr pScreen_, void * pTimeout) | |||||
#else | |||||
static void vncHooksBlockHandler(ScreenPtr pScreen_, void * pTimeout, | static void vncHooksBlockHandler(ScreenPtr pScreen_, void * pTimeout, | ||||
void * pReadmask) | void * pReadmask) | ||||
#else | |||||
static void vncHooksBlockHandler(ScreenPtr pScreen_, void * pTimeout) | |||||
#endif | #endif | ||||
{ | { | ||||
SCREEN_PROLOGUE(pScreen_, BlockHandler); | SCREEN_PROLOGUE(pScreen_, BlockHandler); | ||||
vncHooksScreen->ignoreHooks++; | vncHooksScreen->ignoreHooks++; | ||||
#if XORG <= 118 | |||||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); | |||||
#else | |||||
#if XORG_AT_LEAST(1, 19, 0) | |||||
(*pScreen->BlockHandler) (pScreen, pTimeout); | (*pScreen->BlockHandler) (pScreen, pTimeout); | ||||
#else | |||||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); | |||||
#endif | #endif | ||||
vncHooksScreen->ignoreHooks--; | vncHooksScreen->ignoreHooks--; | ||||
SCREEN_EPILOGUE(BlockHandler); | SCREEN_EPILOGUE(BlockHandler); | ||||
} | } | ||||
#ifdef RENDER | |||||
// Unwrap and rewrap helpers | // Unwrap and rewrap helpers | ||||
#define RENDER_PROLOGUE(scrn,field) \ | #define RENDER_PROLOGUE(scrn,field) \ | ||||
RENDER_EPILOGUE(TriFan); | RENDER_EPILOGUE(TriFan); | ||||
} | } | ||||
#endif /* RENDER */ | |||||
// Unwrap and rewrap helpers | // Unwrap and rewrap helpers | ||||
#define RANDR_PROLOGUE(field) \ | #define RANDR_PROLOGUE(field) \ |
#include <dix-config.h> | #include <dix-config.h> | ||||
#endif | #endif | ||||
#if XORG_VERSION_CURRENT < ((1 * 10000000) + (15 * 100000) + (99 * 1000)) | |||||
#define XORG_AT_LEAST(major, minor, patch) \ | |||||
(XORG_VERSION_CURRENT >= ((major * 10000000) + (minor * 100000) + (patch * 1000))) | |||||
#define XORG_OLDER_THAN(major, minor, patch) \ | |||||
(XORG_VERSION_CURRENT < ((major * 10000000) + (minor * 100000) + (patch * 1000))) | |||||
#if XORG_OLDER_THAN(1, 16, 0) | |||||
#error "X.Org older than 1.16 is not supported" | #error "X.Org older than 1.16 is not supported" | ||||
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (16 * 100000) + (99 * 1000)) | |||||
#define XORG 116 | |||||
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (17 * 100000) + (99 * 1000)) | |||||
#define XORG 117 | |||||
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (18 * 100000) + (99 * 1000)) | |||||
#define XORG 118 | |||||
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (19 * 100000) + (99 * 1000)) | |||||
#define XORG 119 | |||||
#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (20 * 100000) + (99 * 1000)) | |||||
#define XORG 120 | |||||
#else | |||||
#endif | |||||
#if XORG_AT_LEAST(1, 21, 0) | |||||
#error "X.Org newer than 1.20 is not supported" | #error "X.Org newer than 1.20 is not supported" | ||||
#endif | #endif | ||||