@@ -46,7 +46,6 @@ XORG_SOURCE_ARCHIVE = /usr/src/xorg-server.tar.xz | |||
xorg-source-stamp: $(XORG_SOURCE_ARCHIVE) | |||
tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | |||
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 | |||
touch xorg-source-stamp | |||
@@ -1,22 +0,0 @@ | |||
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[]) |
@@ -46,7 +46,6 @@ XORG_SOURCE_ARCHIVE = /usr/src/xorg-server.tar.xz | |||
xorg-source-stamp: $(XORG_SOURCE_ARCHIVE) | |||
tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | |||
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 | |||
touch xorg-source-stamp | |||
@@ -1,22 +0,0 @@ | |||
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[]) |
@@ -47,7 +47,6 @@ xorg-source-stamp: $(XORG_SOURCE_ARCHIVE) | |||
tar -C unix/xserver -axf $(XORG_SOURCE_ARCHIVE) --strip-components=1 | |||
patch -p1 < debian/xorg-source-patches/xserver118-patch.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 | |||
touch xorg-source-stamp | |||
@@ -1,22 +0,0 @@ | |||
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[]) |
@@ -269,7 +269,7 @@ static inline void pressKey(DeviceIntPtr dev, int kc, Bool down, const char *msg | |||
LOG_DEBUG("%s %d %s", msg, kc, down ? "down" : "up"); | |||
action = down ? KeyPress : KeyRelease; | |||
#if XORG < 118 | |||
#if XORG_OLDER_THAN(1, 18, 0) | |||
QueueKeyboardEvents(dev, action, kc, NULL); | |||
#else | |||
QueueKeyboardEvents(dev, action, kc); | |||
@@ -642,12 +642,3 @@ static void vncKeysymKeyboardEvent(KeySym keysym, int down) | |||
*/ | |||
mieqProcessInputEvents(); | |||
} | |||
#if INPUTTHREAD | |||
/** This function is called in Xserver/os/inputthread.c when starting | |||
the input thread. */ | |||
void | |||
ddxInputThreadInit(void) | |||
{ | |||
} | |||
#endif |
@@ -42,7 +42,7 @@ | |||
#define KEYBOARD_OR_FLOAT MASTER_KEYBOARD | |||
#endif | |||
#if XORG < 118 | |||
#if XORG_OLDER_THAN(1, 18, 0) | |||
#define GetMaster(dev, type) ((dev)->master) | |||
#endif | |||
@@ -33,7 +33,7 @@ | |||
#include "vncBlockHandler.h" | |||
#include "xorg-version.h" | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
static void vncBlockHandler(void* data, void* timeout); | |||
static void vncSocketNotify(int fd, int xevents, void *data); | |||
#else | |||
@@ -53,7 +53,7 @@ static struct vncFdEntry* fdsHead = NULL; | |||
void vncRegisterBlockHandlers(void) | |||
{ | |||
if (!RegisterBlockAndWakeupHandlers(vncBlockHandler, | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
(ServerWakeupHandlerProcPtr)NoopDDA, | |||
#else | |||
vncWakeupHandler, | |||
@@ -64,7 +64,7 @@ void vncRegisterBlockHandlers(void) | |||
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); | |||
SetNotifyFd(fd, vncSocketNotify, mask, (void*)(intptr_t)scrIdx); | |||
#else | |||
@@ -96,7 +96,7 @@ void vncSetNotifyFd(int fd, int scrIdx, int read, int write) | |||
void vncRemoveNotifyFd(int fd) | |||
{ | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
RemoveNotifyFd(fd); | |||
#else | |||
struct vncFdEntry** prev; | |||
@@ -117,7 +117,7 @@ void vncRemoveNotifyFd(int fd) | |||
#endif | |||
} | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
static void vncSocketNotify(int fd, int xevents, void *data) | |||
{ | |||
int scrIdx; | |||
@@ -129,7 +129,7 @@ static void vncSocketNotify(int fd, int xevents, void *data) | |||
} | |||
#endif | |||
#if XORG < 119 | |||
#if XORG_OLDER_THAN(1, 19, 0) | |||
static void vncWriteBlockHandlerFallback(OSTimePtr timeout); | |||
static void vncWriteWakeupHandlerFallback(void); | |||
void vncWriteBlockHandler(fd_set *fds); | |||
@@ -143,13 +143,13 @@ void vncWriteWakeupHandler(int nfds, fd_set *fds); | |||
// descriptors that we want read events on. | |||
// | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
static void vncBlockHandler(void* data, void* timeout) | |||
#else | |||
static void vncBlockHandler(void * data, OSTimePtr t, void * readmask) | |||
#endif | |||
{ | |||
#if XORG < 119 | |||
#if XORG_OLDER_THAN(1, 19, 0) | |||
int _timeout; | |||
int* timeout = &_timeout; | |||
static struct timeval tv; | |||
@@ -165,7 +165,7 @@ static void vncBlockHandler(void * data, OSTimePtr t, void * readmask) | |||
vncCallBlockHandlers(timeout); | |||
#if XORG < 119 | |||
#if XORG_OLDER_THAN(1, 19, 0) | |||
if (_timeout != -1) { | |||
tv.tv_sec= _timeout / 1000; | |||
tv.tv_usec = (_timeout % 1000) * 1000; | |||
@@ -184,7 +184,7 @@ static void vncBlockHandler(void * data, OSTimePtr t, void * readmask) | |||
#endif | |||
} | |||
#if XORG < 119 | |||
#if XORG_OLDER_THAN(1, 19, 0) | |||
static void vncWakeupHandler(void * data, int nfds, void * readmask) | |||
{ | |||
fd_set* fds = (fd_set*)readmask; | |||
@@ -211,7 +211,7 @@ static void vncWakeupHandler(void * data, int nfds, void * readmask) | |||
// modified Xorg and might therefore not be called. | |||
// | |||
#if XORG < 119 | |||
#if XORG_OLDER_THAN(1, 19, 0) | |||
static Bool needFallback = TRUE; | |||
static fd_set fallbackFds; | |||
static struct timeval tw; |
@@ -427,8 +427,8 @@ void vncAddCopied(int scrIdx, int nRects, | |||
} | |||
} | |||
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++) | |||
desktop[scr]->setCursor(width, height, hotX, hotY, rgbaData); |
@@ -79,8 +79,8 @@ void vncAddCopied(int scrIdx, int nRects, | |||
const struct UpdateRect *rects, | |||
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 vncPreScreenResize(int scrIdx); |
@@ -35,9 +35,7 @@ | |||
#include "regionstr.h" | |||
#include "dixfontstr.h" | |||
#include "colormapst.h" | |||
#ifdef RENDER | |||
#include "picturestr.h" | |||
#endif | |||
#include "randrstr.h" | |||
#define DBGPRINT(x) //(fprintf x) | |||
@@ -62,11 +60,10 @@ typedef struct _vncHooksScreenRec { | |||
CopyWindowProcPtr CopyWindow; | |||
ClearToBackgroundProcPtr ClearToBackground; | |||
DisplayCursorProcPtr DisplayCursor; | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
CursorWarpedToProcPtr CursorWarpedTo; | |||
#endif | |||
ScreenBlockHandlerProcPtr BlockHandler; | |||
#ifdef RENDER | |||
CompositeProcPtr Composite; | |||
GlyphsProcPtr Glyphs; | |||
CompositeRectsProcPtr CompositeRects; | |||
@@ -74,7 +71,6 @@ typedef struct _vncHooksScreenRec { | |||
TrianglesProcPtr Triangles; | |||
TriStripProcPtr TriStrip; | |||
TriFanProcPtr TriFan; | |||
#endif | |||
RRSetConfigProcPtr rrSetConfig; | |||
RRScreenSetSizeProcPtr rrScreenSetSize; | |||
RRCrtcSetProcPtr rrCrtcSet; | |||
@@ -116,19 +112,18 @@ static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w, | |||
int h, Bool generateExposures); | |||
static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, | |||
ScreenPtr pScreen, CursorPtr cursor); | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
static void vncHooksCursorWarpedTo(DeviceIntPtr pDev, | |||
ScreenPtr pScreen_, ClientPtr pClient, | |||
WindowPtr pWindow, SpritePtr pSprite, | |||
int x, int y); | |||
#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, | |||
void * pReadmask); | |||
#else | |||
static void vncHooksBlockHandler(ScreenPtr pScreen, void * pTimeout); | |||
#endif | |||
#ifdef RENDER | |||
static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, | |||
PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, | |||
INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); | |||
@@ -149,7 +144,6 @@ static void vncHooksTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, | |||
static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, | |||
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, | |||
int npoint, xPointFixed * points); | |||
#endif | |||
static Bool vncHooksRandRSetConfig(ScreenPtr pScreen, Rotation rotation, | |||
int rate, RRScreenSizePtr pSize); | |||
static Bool vncHooksRandRScreenSetSize(ScreenPtr pScreen, | |||
@@ -248,9 +242,7 @@ int vncHooksInit(int scrIdx) | |||
ScreenPtr pScreen; | |||
vncHooksScreenPtr vncHooksScreen; | |||
#ifdef RENDER | |||
PictureScreenPtr ps; | |||
#endif | |||
rrScrPrivPtr rp; | |||
pScreen = screenInfo.screens[scrIdx]; | |||
@@ -280,11 +272,10 @@ int vncHooksInit(int scrIdx) | |||
wrap(vncHooksScreen, pScreen, CopyWindow, vncHooksCopyWindow); | |||
wrap(vncHooksScreen, pScreen, ClearToBackground, vncHooksClearToBackground); | |||
wrap(vncHooksScreen, pScreen, DisplayCursor, vncHooksDisplayCursor); | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
wrap(vncHooksScreen, pScreen, CursorWarpedTo, vncHooksCursorWarpedTo); | |||
#endif | |||
wrap(vncHooksScreen, pScreen, BlockHandler, vncHooksBlockHandler); | |||
#ifdef RENDER | |||
ps = GetPictureScreenIfSet(pScreen); | |||
if (ps) { | |||
wrap(vncHooksScreen, ps, Composite, vncHooksComposite); | |||
@@ -295,7 +286,6 @@ int vncHooksInit(int scrIdx) | |||
wrap(vncHooksScreen, ps, TriStrip, vncHooksTriStrip); | |||
wrap(vncHooksScreen, ps, TriFan, vncHooksTriFan); | |||
} | |||
#endif | |||
rp = rrGetScrPriv(pScreen); | |||
if (rp) { | |||
/* Some RandR callbacks are optional */ | |||
@@ -419,9 +409,7 @@ static inline Bool is_visible(DrawablePtr drawable) | |||
static Bool vncHooksCloseScreen(ScreenPtr pScreen_) | |||
{ | |||
#ifdef RENDER | |||
PictureScreenPtr ps; | |||
#endif | |||
rrScrPrivPtr rp; | |||
SCREEN_PROLOGUE(pScreen_, CloseScreen); | |||
@@ -431,7 +419,6 @@ static Bool vncHooksCloseScreen(ScreenPtr pScreen_) | |||
unwrap(vncHooksScreen, pScreen, ClearToBackground); | |||
unwrap(vncHooksScreen, pScreen, DisplayCursor); | |||
unwrap(vncHooksScreen, pScreen, BlockHandler); | |||
#ifdef RENDER | |||
ps = GetPictureScreenIfSet(pScreen); | |||
if (ps) { | |||
unwrap(vncHooksScreen, ps, Composite); | |||
@@ -442,7 +429,6 @@ static Bool vncHooksCloseScreen(ScreenPtr pScreen_) | |||
unwrap(vncHooksScreen, ps, TriStrip); | |||
unwrap(vncHooksScreen, ps, TriFan); | |||
} | |||
#endif | |||
rp = rrGetScrPriv(pScreen); | |||
if (rp) { | |||
unwrap(vncHooksScreen, rp, rrSetConfig); | |||
@@ -632,7 +618,7 @@ static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, | |||
} | |||
} | |||
vncSetCursor(width, height, hotX, hotY, rgbaData); | |||
vncSetCursorSprite(width, height, hotX, hotY, rgbaData); | |||
free(rgbaData); | |||
} | |||
@@ -645,7 +631,7 @@ out: | |||
// CursorWarpedTo - notify that the cursor was warped | |||
#if XORG >= 119 | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
static void vncHooksCursorWarpedTo(DeviceIntPtr pDev, | |||
ScreenPtr pScreen_, ClientPtr pClient, | |||
WindowPtr pWindow, SpritePtr pSprite, | |||
@@ -660,21 +646,21 @@ static void vncHooksCursorWarpedTo(DeviceIntPtr pDev, | |||
// BlockHandler - ignore any changes during the block handler - it's likely | |||
// 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, | |||
void * pReadmask) | |||
#else | |||
static void vncHooksBlockHandler(ScreenPtr pScreen_, void * pTimeout) | |||
#endif | |||
{ | |||
SCREEN_PROLOGUE(pScreen_, BlockHandler); | |||
vncHooksScreen->ignoreHooks++; | |||
#if XORG <= 118 | |||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); | |||
#else | |||
#if XORG_AT_LEAST(1, 19, 0) | |||
(*pScreen->BlockHandler) (pScreen, pTimeout); | |||
#else | |||
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); | |||
#endif | |||
vncHooksScreen->ignoreHooks--; | |||
@@ -682,8 +668,6 @@ static void vncHooksBlockHandler(ScreenPtr pScreen_, void * pTimeout) | |||
SCREEN_EPILOGUE(BlockHandler); | |||
} | |||
#ifdef RENDER | |||
// Unwrap and rewrap helpers | |||
#define RENDER_PROLOGUE(scrn,field) \ | |||
@@ -1112,8 +1096,6 @@ static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, | |||
RENDER_EPILOGUE(TriFan); | |||
} | |||
#endif /* RENDER */ | |||
// Unwrap and rewrap helpers | |||
#define RANDR_PROLOGUE(field) \ |
@@ -24,19 +24,16 @@ | |||
#include <dix-config.h> | |||
#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" | |||
#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" | |||
#endif | |||