slackware-current/extra/source/tigervnc/patches/tigervnc-support-xorg120.patch
Patrick J Volkerding 646a5c1cbf Mon May 28 19:12:29 UTC 2018
a/pkgtools-15.0-noarch-13.txz:  Rebuilt.
  installpkg: default line length for --terselength is the number of columns.
  removepkg: added --terse mode.
  upgradepkg: default line length for --terselength is the number of columns.
  upgradepkg: accept -option in addition to --option.
ap/vim-8.1.0026-x86_64-1.txz:  Upgraded.
d/bison-3.0.5-x86_64-1.txz:  Upgraded.
e/emacs-26.1-x86_64-1.txz:  Upgraded.
kde/kopete-4.14.3-x86_64-8.txz:  Rebuilt.
  Recompiled against libidn-1.35.
n/conntrack-tools-1.4.5-x86_64-1.txz:  Upgraded.
n/libnetfilter_conntrack-1.0.7-x86_64-1.txz:  Upgraded.
n/libnftnl-1.1.0-x86_64-1.txz:  Upgraded.
n/links-2.16-x86_64-2.txz:  Rebuilt.
  Rebuilt to enable X driver for -g mode.
n/lynx-2.8.9dev.19-x86_64-1.txz:  Upgraded.
n/nftables-0.8.5-x86_64-1.txz:  Upgraded.
n/p11-kit-0.23.11-x86_64-1.txz:  Upgraded.
n/ulogd-2.0.7-x86_64-1.txz:  Upgraded.
n/whois-5.3.1-x86_64-1.txz:  Upgraded.
xap/network-manager-applet-1.8.12-x86_64-1.txz:  Upgraded.
xap/vim-gvim-8.1.0026-x86_64-1.txz:  Upgraded.
2018-05-31 23:39:35 +02:00

58 lines
1.5 KiB
Diff

diff --git a/unix/xserver/hw/vnc/xorg-version.h b/unix/xserver/hw/vnc/xorg-version.h
index 9d1c0eb..79ff79a 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 93d8af4..1517809 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);
+#if XORG < 120
#ifdef DPMSExtension
/* Why support DPMS? Because stupid modern desktop environments
such as Unity 2D on Ubuntu 11.10 crashes if DPMS is not
@@ -219,6 +220,7 @@ Bool DPMSSupported(void)
return FALSE;
}
#endif
+#endif
#if XORG < 111
void ddxGiveUp()
@@ -1491,6 +1491,12 @@ vfbCloseScreen(ScreenPtr pScreen)
#endif
}
+#if XORG >= 120
+static void vncDPMS(ScreenPtr pScreen, int level)
+{
+}
+#endif
+
static Bool
#if XORG < 113
vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
@@ -1661,6 +1667,9 @@ vfbScreenInit(ScreenPtr pScreen, int arg
if (!ret) return FALSE;
#endif
+#if XORG >= 120
+ pScreen->DPMS = vncDPMS;
+#endif
return TRUE;