diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-02-20 17:23:56 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-06-19 16:50:37 +0200 |
commit | 662676e3b8bf06d365e4906c1979e188125906da (patch) | |
tree | 0684f256a90bf145ca8361e05402aa96e039ce6e /unix/xserver | |
parent | f5ac658b9c4a3c494c09a2e2139123cbc94d7769 (diff) | |
download | tigervnc-662676e3b8bf06d365e4906c1979e188125906da.tar.gz tigervnc-662676e3b8bf06d365e4906c1979e188125906da.zip |
Avoid patching miinitext.c for Xvnc
Things do not need to be this complicated. We can make sure the VNC
extension is always included in a much cleaner way, at least since Xorg
1.16.
Diffstat (limited to 'unix/xserver')
-rw-r--r-- | unix/xserver/hw/vnc/Makefile.am | 2 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/xvnc.c | 25 |
2 files changed, 12 insertions, 15 deletions
diff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am index cd1f7fe9..f9ed19d9 100644 --- a/unix/xserver/hw/vnc/Makefile.am +++ b/unix/xserver/hw/vnc/Makefile.am @@ -42,8 +42,6 @@ Xvnc_SOURCES = xvnc.c \ # recommendation for coaxing automake. nodist_EXTRA_Xvnc_SOURCES = dummy.cxx -Xvnc_CPPFLAGS = $(AM_CPPFLAGS) -DTIGERVNC - LOCAL_LIBS = \ $(XVNC_LIBS) \ $(XSERVER_LIBS) \ diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c index 6065cc49..4ee1cd1b 100644 --- a/unix/xserver/hw/vnc/xvnc.c +++ b/unix/xserver/hw/vnc/xvnc.c @@ -1,6 +1,6 @@ /* Copyright (c) 1993 X Consortium Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. - Copyright 2009-2015 Pierre Ossman for Cendio AB + Copyright 2009-2024 Pierre Ossman for Cendio AB Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -1106,14 +1106,17 @@ vncClientStateChange(CallbackListPtr *a, void *b, void *c) #ifdef GLXEXT #if XORG_OLDER_THAN(1, 20, 0) extern void GlxExtensionInit(void); +#endif +#endif -static ExtensionModule glxExt = { - GlxExtensionInit, - "GLX", - &noGlxExtension -}; +static const ExtensionModule vncExtensions[] = { + {vncExtensionInit, "VNC-EXTENSION", NULL}, +#ifdef GLXEXT +#if XORG_OLDER_THAN(1, 20, 0) + { GlxExtensionInit, "GLX", &noGlxExtension }, #endif #endif +}; void InitOutput(ScreenInfo * scrInfo, int argc, char **argv) @@ -1123,15 +1126,11 @@ InitOutput(ScreenInfo * scrInfo, int argc, char **argv) vncPrintBanner(); -#if XORG_AT_LEAST(1, 20, 0) - xorgGlxCreateVendor(); -#else - -#ifdef GLXEXT if (serverGeneration == 1) - LoadExtensionList(&glxExt, 1, TRUE); -#endif + LoadExtensionList(vncExtensions, ARRAY_SIZE(vncExtensions), TRUE); +#if XORG_AT_LEAST(1, 20, 0) + xorgGlxCreateVendor(); #endif /* initialize pixmap formats */ |