From 3a37af39e040b7731df2c3751991b8b413ba8ecf Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Wed, 6 Jun 2018 13:33:37 +0200 Subject: Add support for X server 1.20.0. In-server GLVND requires xorgGlxCreateVendor call from InitOutput. DPMS functions were moved to another location and no longer need to be faked. xserver120.patch is a copy of xserver119.patch with refreshed contexts. --- unix/xserver/hw/vnc/xorg-version.h | 4 +++- unix/xserver/hw/vnc/xvnc.c | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'unix/xserver/hw') diff --git a/unix/xserver/hw/vnc/xorg-version.h b/unix/xserver/hw/vnc/xorg-version.h index 9d1c0eb8..16145711 100644 --- a/unix/xserver/hw/vnc/xorg-version.h +++ b/unix/xserver/hw/vnc/xorg-version.h @@ -52,8 +52,10 @@ #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 -#error "X.Org newer than 1.19 is not supported" +#error "X.Org newer than 1.20 is not supported" #endif #endif diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c index 57152cd5..9a61b1ef 100644 --- a/unix/xserver/hw/vnc/xvnc.c +++ b/unix/xserver/hw/vnc/xvnc.c @@ -202,6 +202,7 @@ vfbBitsPerPixel(int depth) static void vfbFreeFramebufferMemory(vfbFramebufferInfoPtr pfb); #ifdef DPMSExtension +#if XORG < 120 /* Why support DPMS? Because stupid modern desktop environments such as Unity 2D on Ubuntu 11.10 crashes if DPMS is not available. (DPMSSet is called by dpms.c, but the return value @@ -218,6 +219,7 @@ Bool DPMSSupported(void) return FALSE; } #endif +#endif #if XORG < 111 void ddxGiveUp() @@ -1738,6 +1740,10 @@ InitOutput(ScreenInfo *scrInfo, int argc, char **argv) vncPrintBanner(); +#if XORG >= 120 + xorgGlxCreateVendor(); +#else + #if XORG >= 113 #ifdef GLXEXT if (serverGeneration == 1) @@ -1747,6 +1753,8 @@ InitOutput(ScreenInfo *scrInfo, int argc, char **argv) LoadExtension(&glxExt, TRUE); #endif #endif +#endif + #endif /* initialize pixmap formats */ -- cgit v1.2.3