diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-03-12 11:15:32 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-03-12 11:15:32 +0100 |
commit | d1cb31f43636e574058f64ac3e5e4cbe20f162b4 (patch) | |
tree | 1260ce593ca99b9fe22eb51b906f54b2c0f567fe /unix | |
parent | 59b4bc5638ced3cb5f043ccd9ed207fe76148d1a (diff) | |
parent | 4cf2d3a621ecb9918b57021bc1cee1bd016dc0aa (diff) | |
download | tigervnc-d1cb31f43636e574058f64ac3e5e4cbe20f162b4.tar.gz tigervnc-d1cb31f43636e574058f64ac3e5e4cbe20f162b4.zip |
Merge branch 'upreqs' of https://github.com/CendioOssman/tigervnc
Conflicts:
contrib/packages/rpm/el5/SPECS/tigervnc.spec
vncviewer/Viewport.cxx
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/build-xorg | 361 | ||||
-rwxr-xr-x | unix/download-xorg-7.4 | 84 | ||||
-rwxr-xr-x | unix/download-xorg-7.5 | 85 | ||||
-rw-r--r-- | unix/xorg-7.4-patches/0001-Add-dridir-param.patch | 97 | ||||
-rw-r--r-- | unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch | 33 | ||||
-rw-r--r-- | unix/xorg-7.5-patches/0001-Add-dridir-param.patch | 131 | ||||
-rw-r--r-- | unix/xorg-7.5-patches/0001-Add-xkbcompdir-param.patch | 46 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/Input.c | 93 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/InputCore.c | 596 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/InputXKB.c | 4 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/Makefile.am | 2 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/vncHooks.c | 30 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/xorg-version.h | 6 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/xvnc.c | 49 | ||||
-rw-r--r-- | unix/xserver15.patch | 158 | ||||
-rw-r--r-- | unix/xserver16.patch | 99 |
16 files changed, 30 insertions, 1844 deletions
diff --git a/unix/build-xorg b/unix/build-xorg deleted file mode 100755 index 2908e489..00000000 --- a/unix/build-xorg +++ /dev/null @@ -1,361 +0,0 @@ -#!/bin/bash -# -*- mode: shell-script; coding: UTF-8 -*- -# -# Build Xvnc with Xorg 7.4 or 7.5 -# - -set -e - -PREFIX= -MAKE="make" -PARALLEL_MAKE=0 -XORG_VERSION=7.4 -XONLY=0 -CFGHOST= -SRCDIR=`dirname $0`/.. - -modules="dri2proto \ - libpthread-stubs \ - glproto \ - xf86vidmodeproto \ - xextproto \ - xproto \ - kbproto \ - inputproto \ - xcmiscproto \ - bigreqsproto \ - fixesproto \ - damageproto \ - xf86driproto \ - randrproto \ - renderproto \ - scrnsaverproto \ - resourceproto \ - fontsproto \ - videoproto \ - compositeproto \ - xineramaproto \ - libdrm \ - libXau \ - xtrans \ - libXdmcp \ - libX11 \ - libXext \ - libXxf86vm \ - libICE \ - libSM \ - libXt \ - libXmu \ - libXfixes \ - libXdamage \ - libXi \ - libxkbfile \ - libfontenc \ - libXfont \ - libpciaccess \ - pixman" - -modules74="fontcacheproto \ - evieext" - -init() -{ - update_modules - - pushd xorg - tar jxf ~/.tigervnc-xorg-$XORG_VERSION/util-macros.tar.bz2 - pushd util-macros-* - echo "Building macros" - ./configure --prefix=${PREFIX} - ($MAKE install) - popd - - pushd xserver - - if [ "$XORG_VERSION" = "7.4" ]; then - patch -p1 < $SRCDIR/unix/xserver16.patch - else - patch -p1 < $SRCDIR/unix/xserver18.patch - fi - for all in `find $SRCDIR/unix/xorg-$XORG_VERSION-patches/ -type f |grep '.*\.patch$'`; do - echo Applying $all - patch -p1 < $all - done - - popd - popd -} - - -update_modules() -{ - if [ -d xorg ]; then rm -rf xorg; fi - if [ -d xorg.build ]; then rm -rf xorg.build; fi - mkdir xorg - pushd xorg - $SRCDIR/unix/download-xorg-$XORG_VERSION - for module in ${modules}; do - tar jxf ~/.tigervnc-xorg-$XORG_VERSION/${module}.tar.bz2 - done - - [ -r ~/.tigervnc-xorg-$XORG_VERSION/Mesa.tar.bz2 ] && \ - tar jxf ~/.tigervnc-xorg-$XORG_VERSION/Mesa.tar.bz2 - [ -r ~/.tigervnc-xorg-$XORG_VERSION/Mesa.tar.gz ] && \ - tar zxf ~/.tigervnc-xorg-$XORG_VERSION/Mesa.tar.gz - - tar jxf ~/.tigervnc-xorg-$XORG_VERSION/freetype.tar.bz2 - tar jxf ~/.tigervnc-xorg-$XORG_VERSION/xorg-server.tar.bz2 - cp -r $SRCDIR/unix/xserver xserver - cp -r xorg-server-1.*/* xserver - popd -} - - -build () -{ - if [ $XONLY -eq 0 ]; then - - # Build VNC - echo "*** Building VNC ***" - cmake -G"Unix Makefiles" ${1+"$@"} -DUSE_INCLUDED_ZLIB=1 -DBUILD_STATIC=1 $SRCDIR - $MAKE - - # Build Xorg - echo "*** Building Xorg ***" - pushd xorg - - # build freetype - echo "*** Building freetype ***" - pushd freetype-* - ./configure ${CFGHOST} --prefix=${PREFIX} --enable-static --disable-shared - if [ $? -ne 0 ]; then - echo "Failed to configure freetype." - exit - fi - $MAKE install - popd - - for module in ${modules}; do - extraoptions="" - cd ${module}-* - echo ====================== - echo configuring ${module} - echo ====================== - if [ "${module}" = "libX11" ]; then - extraoptions="${extraoptions} --without-xcb --disable-specs" - fi - if [ "${module}" = "libSM" ]; then - extraoptions="${extraoptions} --without-libuuid" - fi - if [ "${module}" = "pixman" ]; then - extraoptions="${extraoptions} --disable-gtk" - fi - if [ "${module}" = "libXfont" ]; then - extraoptions="${extraoptions} --with-freetype-config=${PREFIX}/bin/freetype-config" - fi - OLD_CFLAGS=${CFLAGS} - OLD_CXXFLAGS=${CXXFLAGS} - CFLAGS=${CFLAGS}' -fPIC' - CXXFLAGS=${CXXFLAGS}' -fPIC' - export CFLAGS CXXFLAGS - ./configure ${CFGHOST} --prefix="${PREFIX}" ${extraoptions} --enable-static --disable-shared - CFLAGS=${OLD_CFLAGS} - CXXFLAGS=${OLD_CXXFLAGS} - export CFLAGS CXXFLAGS - echo ====================== - echo building ${module} - echo ====================== - if [ $? -ne 0 ]; then - echo "Failed to configure ${module}." - exit - fi - $MAKE install - cd .. - done - - # build mesa - echo "*** Building Mesa ***" - pushd Mesa-* - ./configure ${CFGHOST} --prefix=${PREFIX} --disable-driglx-direct --with-dri-drivers=swrast --with-driver=dri --disable-glut --without-demos - if [ $? -ne 0 ]; then - echo "Failed to configure Mesa." - exit - fi - $MAKE - $MAKE install - popd - - popd - - fi # XONLY - - # build xserver - echo "*** Building xserver ***" - pushd xorg/xserver - autoreconf -fiv - XORGCFGFLAGS="--disable-dri --enable-dri2 --disable-composite --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive --disable-config-dbus --disable-config-hal --disable-config-udev --with-sha1=libgcrypt SHA1_LIB=-lcrypto --disable-shared --enable-static ${XORGCFGFLAGS}" - ./configure ${CFGHOST} --prefix=${PREFIX} ${XORGCFGFLAGS} - if [ $? -ne 0 ]; then - echo "Failed to configure X server." - exit - fi - $MAKE TIGERVNC_SRCDIR=$SRCDIR install - popd -} - -rebuild () -{ - # Build VNC - echo "*** Building VNC ***" - $MAKE ${1+"$@"} - - # build xserver - echo "*** Building xserver ***" - pushd xorg/xserver - $MAKE TIGERVNC_SRCDIR=$SRCDIR install ${1+"$@"} - popd -} - - -usage () -{ - echo "Usage: $0 init [-version <7.4 | 7.5>]" - echo - echo " $0 build [-version <7.4 | 7.5>]" - echo " [additional CMake flags]" - echo - echo " $0 rebuild [additional make options]" - echo - echo " $0 update [-version <7.4 | 7.5>]" - echo - exit 1 -} - -if [ -x '/usr/bin/getconf' -a "$PARALLEL_MAKE" = "1" ]; then - MAKE_PARALLEL=`/usr/bin/getconf _NPROCESSORS_ONLN 2>&1` - [ "$MAKE_PARALLEL" -gt 1 ] && MAKE="$MAKE -j$MAKE_PARALLEL" -fi - -while [ $# -gt 0 ] -do - case "$1" in - init) MODE=init ;; - build) MODE=build ;; - xbuild) MODE=build; XONLY=1 ;; - rebuild) MODE=rebuild ;; - update) MODE=update ;; - -version) XORG_VERSION=$2; shift ;; - -parallel) PARALLEL_MAKE=1; ;; - -srcdir) SRCDIR=$2; shift ;; - *) break ;; - esac - shift -done - -case "$XORG_VERSION" in - 7.4) modules=$modules" "$modules74 ;; - 7.5) ;; - *) if [ ! "$MODE" = "rebuild" ]; then usage; fi ;; -esac - -pushd $SRCDIR -SRCDIR=`pwd` -echo "*** Using TigerVNC source tree at $SRCDIR ***" -popd - -if [ "`pwd`" = "$SRCDIR/unix" ]; then - cd $SRCDIR -fi - -if [ "$PREFIX" = "" ]; then - PREFIX=`pwd`/xorg.build -fi - -if [ "$MODE" = "build" ]; then - if [ ! -d ./xorg.build/syslib ]; then - mkdir -p ./xorg.build/syslib - fi - - for i in "$@"; do - case "$i" in - CC=*) CC=`echo $i | sed s/^CC=//g` ;; - CXX=*) CXX=`echo $i | sed s/^CXX=//g` ;; - CFLAGS=*) CFLAGS=`echo $i | sed s/^CFLAGS=//g` ;; - CXXFLAGS=*) CXXFLAGS=`echo $i | sed s/^CXXFLAGS=//g` ;; - LDFLAGS=*) LDFLAGS=`echo $i | sed s/^LDFLAGS=//g` ;; - esac - done - if [ "$CC" = "" ]; then - CC=gcc - fi - if [ "$CXX" = "" ]; then - CXX=g++ - fi - if [ "$CFLAGS" = "" ]; then - CFLAGS=-O3 - fi - if [ "$CXXFLAGS" = "" ]; then - CXXFLAGS=-O3 - fi - CFLAGS="$CFLAGS -fPIC" - CXXFLAGS="$CXXFLAGS -fPIC" - LDFLAGS="$LDFLAGS -static-libgcc -L`pwd`/xorg.build/syslib" - echo CC = $CC - echo CXX = $CXX - echo CFLAGS = $CFLAGS - echo CXXFLAGS = $CXXFLAGS - echo LDFLAGS = $LDFLAGS - if [[ $CFLAGS = *-m32* ]]; then - CFGHOST="--host i686-pc-linux-gnu" - fi - STATICLIBS='libcrypto.a libz.a' - for lib in $STATICLIBS; do - if [ -f ./xorg.build/syslib/$lib ]; then - rm -f ./xorg.build/syslib/$lib - fi - done - IS64BIT=`echo -e "#ifdef __x86_64__\nis64bit_yes\n#else\nis64bit_no\n#endif" | $CC $CFLAGS -E - | grep is64bit` - STATICLIBDIR= - case $IS64BIT in - is64bit_yes) - if [ -d /usr/lib64 ]; then STATICLIBDIR=lib64; - else STATICLIBDIR=lib; fi - ;; - is64bit_no) - if [ -d /usr/lib32 ]; then STATICLIBDIR=lib32; - else STATICLIBDIR=lib; fi - ;; - *) - echo "Cannot determine whether compiler output is 64-bit or 32-bit. Are you using GCC?" - exit 1 - ;; - esac - for lib in $STATICLIBS; do - if [ -f /usr/$STATICLIBDIR/$lib ]; then - ln -fs /usr/$STATICLIBDIR/$lib ./xorg.build/syslib - else - if [ -f /$STATICLIBDIR/$lib ]; then - ln -fs /$STATICLIBDIR/$lib ./xorg.build/syslib - else - DYLIB=`echo $lib | sed s/\\\.a/\\.so/g` - if [ -f /usr/$STATICLIBDIR/$DYLIB -o -f /$STATICLIBDIR/$DYLIB ]; then - echo WARNING: Cannot find suitable $lib. Xvnc will depend on $DYLIB. - fi - fi - fi - done -fi - -export ACLOCAL="aclocal -I ${PREFIX}/share/aclocal" -export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig:${PREFIX}/share/pkgconfig" - -case "$MODE" in - init) init ;; - build) - export CFLAGS CXXFLAGS LDFLAGS - build ${1+"$@"}; - ;; - rebuild) rebuild ${1+"$@"} ;; - update) update ;; - *) usage ;; -esac diff --git a/unix/download-xorg-7.4 b/unix/download-xorg-7.4 deleted file mode 100755 index be615077..00000000 --- a/unix/download-xorg-7.4 +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python -# -*-mode: python; coding: UTF-8 -*- - -import os -import glob - -#INDI = "http://ftp.sunet.se/pub/X11/ftp.x.org/individual" -INDI = "http://ftp.x.org/pub/individual/" -PROTO = INDI + "proto/" -LIB = INDI + "lib/" -SERVER = INDI + "xserver/" -UTIL = INDI + "util/" -DATA = INDI + "data/" -APP = INDI + "app/" - -packages = { - "damageproto": PROTO + "damageproto-1.1.0.tar.bz2", - "fixesproto": PROTO + "fixesproto-4.0.tar.bz2", - "resourceproto": PROTO + "resourceproto-1.0.2.tar.bz2", - "fontsproto": PROTO + "fontsproto-2.0.2.tar.bz2", - "fontcacheproto" : PROTO + "fontcacheproto-0.1.2.tar.bz2", - "bigreqsproto": PROTO + "bigreqsproto-1.0.2.tar.bz2", - "kbproto": PROTO + "kbproto-1.0.3.tar.bz2", - "inputproto": PROTO + "inputproto-1.5.1.tar.bz2", - "glproto": PROTO + "glproto-1.4.9.tar.bz2", - "xineramaproto": PROTO + "xineramaproto-1.1.2.tar.bz2", - "randrproto": PROTO + "randrproto-1.3.2.tar.bz2", - "scrnsaverproto": PROTO + "scrnsaverproto-1.1.0.tar.bz2", - "renderproto": PROTO + "renderproto-0.9.3.tar.bz2", - "evieext": PROTO + "evieext-1.0.2.tar.bz2", - "xcmiscproto": PROTO + "xcmiscproto-1.1.2.tar.bz2", - "xextproto": PROTO + "xextproto-7.0.3.tar.bz2", - "xf86driproto": PROTO + "xf86driproto-2.0.4.tar.bz2", - "dri2proto": PROTO + "dri2proto-2.1.tar.bz2", - "compositeproto": PROTO + "compositeproto-0.4.tar.bz2", - "xf86vidmodeproto": PROTO + "xf86vidmodeproto-2.2.2.tar.bz2", - "videoproto": PROTO + "videoproto-2.2.2.tar.bz2", - "xproto": PROTO + "xproto-7.0.13.tar.bz2", - - "libxkbfile": LIB + "libxkbfile-1.0.5.tar.bz2", - "libXxf86vm": LIB + "libXxf86vm-1.0.2.tar.bz2", - "libXext": LIB + "libXext-1.0.4.tar.bz2", - "libfontenc": LIB + "libfontenc-1.0.4.tar.bz2", - "libXau": LIB + "libXau-1.0.4.tar.bz2", - "libXfont": LIB + "libXfont-1.3.4.tar.bz2", - "libXfixes": LIB + "libXfixes-4.0.3.tar.bz2", - "libSM": LIB + "libSM-1.1.0.tar.bz2", - "libXi": LIB + "libXi-1.1.3.tar.bz2", - "libXmu": LIB + "libXmu-1.0.4.tar.bz2", - "libX11": LIB + "libX11-1.1.5.tar.bz2", - "libXdmcp": LIB + "libXdmcp-1.0.2.tar.bz2", - "xtrans": LIB + "xtrans-1.2.2.tar.bz2", - "libXt": LIB + "libXt-1.0.5.tar.bz2", - "libpciaccess": LIB + "libpciaccess-0.10.4.tar.bz2", - "libICE": LIB + "libICE-1.0.4.tar.bz2", - "pixman": LIB + "pixman-0.16.0.tar.bz2", - "libXdamage": LIB + "libXdamage-1.1.1.tar.bz2", - - "util-macros": UTIL + "util-macros-1.1.6.tar.bz2", - "xorg-server": SERVER + "xorg-server-1.6.5.tar.bz2", - - "libdrm": "http://dri.freedesktop.org/libdrm/libdrm-2.4.0.tar.bz2", - "Mesa": "http://downloads.sourceforge.net/mesa3d/MesaLib-7.2.tar.bz2", - "libpthread-stubs": "http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2", - "freetype": "http://downloads.sourceforge.net/freetype/freetype-2.3.11.tar.bz2", - } - - - -def main(): - dir = os.path.expanduser("~")+"/.tigervnc-xorg-7.4" - cwd = os.getcwd() - if not os.path.exists(dir): - os.mkdir(dir) - os.chdir(dir) - - for pkg in packages.keys(): - loc = packages[pkg] - fname = pkg + ".tar.bz2" - if not os.path.exists(fname): - assert 0 == os.spawnvp(os.P_WAIT, "wget", ["-N", "-c", "-O", fname, loc]) - - os.chdir(cwd) -main() diff --git a/unix/download-xorg-7.5 b/unix/download-xorg-7.5 deleted file mode 100755 index 1b802a2b..00000000 --- a/unix/download-xorg-7.5 +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python -# -*-mode: python; coding: UTF-8 -*- - -import os -import glob - -#INDI = "http://ftp.sunet.se/pub/X11/ftp.x.org/individual" -INDI = "http://ftp.x.org/pub/individual/" -PROTO = INDI + "proto/" -LIB = INDI + "lib/" -SERVER = INDI + "xserver/" -UTIL = INDI + "util/" -DATA = INDI + "data/" -APP = INDI + "app/" - -packages = { - "damageproto": PROTO + "damageproto-1.2.0.tar.bz2", - "fixesproto": PROTO + "fixesproto-4.1.1.tar.bz2", - "resourceproto": PROTO + "resourceproto-1.1.0.tar.bz2", - "fontsproto": PROTO + "fontsproto-2.1.0.tar.bz2", - "bigreqsproto": PROTO + "bigreqsproto-1.1.0.tar.bz2", - "kbproto": PROTO + "kbproto-1.0.4.tar.bz2", - "inputproto": PROTO + "inputproto-2.0.tar.bz2", - "glproto": PROTO + "glproto-1.4.12.tar.bz2", - "xineramaproto": PROTO + "xineramaproto-1.2.tar.bz2", - "randrproto": PROTO + "randrproto-1.3.1.tar.bz2", - "scrnsaverproto": PROTO + "scrnsaverproto-1.2.0.tar.bz2", - "renderproto": PROTO + "renderproto-0.11.tar.bz2", - "xcmiscproto": PROTO + "xcmiscproto-1.2.0.tar.bz2", - "xextproto": PROTO + "xextproto-7.1.1.tar.bz2", - "xf86driproto": PROTO + "xf86driproto-2.1.0.tar.bz2", - "dri2proto": PROTO + "dri2proto-2.1.tar.bz2", - "compositeproto": PROTO + "compositeproto-0.4.1.tar.bz2", - "xf86vidmodeproto": PROTO + "xf86vidmodeproto-2.3.tar.bz2", - "videoproto": PROTO + "videoproto-2.3.0.tar.bz2", - "xproto": PROTO + "xproto-7.0.16.tar.bz2", - - "libxkbfile": LIB + "libxkbfile-1.0.6.tar.bz2", - "libXxf86vm": LIB + "libXxf86vm-1.1.0.tar.bz2", - "libXext": LIB + "libXext-1.1.2.tar.bz2", - "libfontenc": LIB + "libfontenc-1.0.5.tar.bz2", - "libXau": LIB + "libXau-1.0.6.tar.bz2", - "libXfont": LIB + "libXfont-1.4.2.tar.bz2", - "libXfixes": LIB + "libXfixes-4.0.5.tar.bz2", - "libSM": LIB + "libSM-1.1.1.tar.bz2", - "libXi": LIB + "libXi-1.3.2.tar.bz2", - "libXmu": LIB + "libXmu-1.0.5.tar.bz2", - "libX11": LIB + "libX11-1.3.5.tar.bz2", - "libXdmcp": LIB + "libXdmcp-1.0.3.tar.bz2", - "xtrans": LIB + "xtrans-1.2.5.tar.bz2", - "libXt": LIB + "libXt-1.0.8.tar.bz2", - "libpciaccess": LIB + "libpciaccess-0.12.0.tar.bz2", - "libICE": LIB + "libICE-1.0.6.tar.bz2", - "pixman": LIB + "pixman-0.19.2.tar.bz2", - "libXdamage": LIB + "libXdamage-1.1.3.tar.bz2", - - "util-macros": UTIL + "util-macros-1.10.0.tar.bz2", - "xorg-server": SERVER + "xorg-server-1.8.2.tar.bz2", - - "libdrm": "http://dri.freedesktop.org/libdrm/libdrm-2.4.21.tar.bz2", - "Mesa": "ftp://ftp.freedesktop.org/pub/mesa/beta/MesaLib-7.8.3-rc1.tar.bz2", - "libpthread-stubs": "http://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.bz2", - "freetype": "http://downloads.sourceforge.net/freetype/freetype-2.4.2.tar.bz2", - } - - - -def main(): - dir = os.path.expanduser("~")+"/.tigervnc-xorg-7.5" - cwd = os.getcwd() - if not os.path.exists(dir): - os.mkdir(dir) - os.chdir(dir) - - for pkg in packages.keys(): - loc = packages[pkg] - if ".tar.bz2" in loc: - fname = pkg + ".tar.bz2" - else : - fname = pkg + ".tar.gz" - if not os.path.exists(fname): - assert 0 == os.spawnvp(os.P_WAIT, "wget", ["-N", "-c", "-O", fname, loc]) - - os.chdir(cwd) -main() diff --git a/unix/xorg-7.4-patches/0001-Add-dridir-param.patch b/unix/xorg-7.4-patches/0001-Add-dridir-param.patch deleted file mode 100644 index d36994c7..00000000 --- a/unix/xorg-7.4-patches/0001-Add-dridir-param.patch +++ /dev/null @@ -1,97 +0,0 @@ -*** a/glx/glxdri.c 2011-02-16 14:00:53.000000000 -0600 ---- b/glx/glxdri.c 2011-02-16 13:56:09.000000000 -0600 -*************** -*** 838,843 **** - - -- static const char dri_driver_path[] = DRI_DRIVER_PATH; -- - static Bool - glxDRIEnterVT (int index, int flags) ---- 838,841 ---- -diff -r -C2 a/glx/glxdriswrast.c b/glx/glxdriswrast.c -*** a/glx/glxdriswrast.c 2011-02-16 14:00:53.000000000 -0600 ---- b/glx/glxdriswrast.c 2011-02-16 13:56:29.000000000 -0600 -*************** -*** 448,453 **** - } - -- static const char dri_driver_path[] = DRI_DRIVER_PATH; -- - static __GLXscreen * - __glXDRIscreenProbe(ScreenPtr pScreen) ---- 448,451 ---- -diff -r -C2 a/glx/glxext.c b/glx/glxext.c -*** a/glx/glxext.c 2011-02-16 14:00:54.000000000 -0600 ---- b/glx/glxext.c 2011-02-16 13:58:39.000000000 -0600 -*************** -*** 520,521 **** ---- 520,548 ---- - return retval; - } -+ -+ char *dri_driver_path = DRI_DRIVER_PATH; -+ -+ int GlxProcessArguments(int argc, char *argv[], int i) -+ { -+ if (strncmp(argv[i], "-dridir", 7) == 0) { -+ if (++i < argc) { -+ #if !defined(WIN32) && !defined(__CYGWIN__) -+ if (getuid() != geteuid()) { -+ LogMessage(X_WARNING, "-dridir is not available for setuid X servers\n"); -+ return -1; -+ } else -+ #endif -+ { -+ if (strlen(argv[i]) < PATH_MAX) { -+ dri_driver_path = argv[i]; -+ return 2; -+ } else { -+ LogMessage(X_ERROR, "-dridir pathname too long\n"); -+ return -1; -+ } -+ } -+ } -+ } -+ -+ return 0; -+ } -diff -r -C2 a/glx/glxserver.h b/glx/glxserver.h -*** a/glx/glxserver.h 2011-02-16 14:00:54.000000000 -0600 ---- b/glx/glxserver.h 2011-02-16 14:01:44.000000000 -0600 -*************** -*** 264,266 **** ---- 264,269 ---- - GLint alignment); - -+ extern char *dri_driver_path; -+ extern int GlxProcessArguments(int argc, char *argv[], int i); -+ - #endif /* !__GLX_server_h__ */ -Only in b/os: ._utils.c -diff -r -C2 a/os/utils.c b/os/utils.c -*** a/os/utils.c 2011-02-16 14:01:18.000000000 -0600 ---- b/os/utils.c 2011-02-16 14:04:11.000000000 -0600 -*************** -*** 159,162 **** ---- 159,163 ---- - _X_EXPORT Bool noGlxExtension = FALSE; - _X_EXPORT Bool noGlxVisualInit = FALSE; -+ extern int GlxProcessArguments(int argc, char *argv[], int i); - #endif - #ifdef SCREENSAVER -*************** -*** 854,857 **** ---- 855,866 ---- - } - #endif -+ #ifdef GLXEXT -+ else if ((skip = GlxProcessArguments(argc,argv,i)) != 0) { -+ if (skip > 0) -+ i += skip - 1; -+ else -+ UseMsg(); -+ } -+ #endif - #ifdef RLIMIT_DATA - else if ( strcmp( argv[i], "-ld") == 0) diff --git a/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch b/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch deleted file mode 100644 index d9d47d45..00000000 --- a/unix/xorg-7.4-patches/0001-Add-xkbcompdir-param.patch +++ /dev/null @@ -1,33 +0,0 @@ -Only in b/xkb: ._xkbInit.c -diff -r -C2 a/xkb/xkbInit.c b/xkb/xkbInit.c -*** a/xkb/xkbInit.c 2011-02-16 14:07:03.000000000 -0600 ---- b/xkb/xkbInit.c 2011-02-16 14:08:08.000000000 -0600 -*************** -*** 875,879 **** ---- 875,900 ---- - } - return j; -+ } else if (strncmp(argv[i], "-xkbcompdir", 11)==0) { -+ if (++i < argc) { -+ #if !defined(WIN32) && !defined(__CYGWIN__) -+ if (getuid() != geteuid()) { -+ LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n"); -+ return -1; -+ } else -+ #endif -+ { -+ if (strlen(argv[i]) < PATH_MAX) { -+ XkbBinDirectory = argv[i]; -+ return 2; -+ } else { -+ LogMessage(X_ERROR, "-xkbcompdir pathname too long\n"); -+ return -1; -+ } -+ } -+ } else { -+ return -1; -+ } - } -+ - if ((strcmp(argv[i], "-ardelay") == 0) || - (strcmp (argv[i], "-ar1") == 0)) { /* -ardelay int */ diff --git a/unix/xorg-7.5-patches/0001-Add-dridir-param.patch b/unix/xorg-7.5-patches/0001-Add-dridir-param.patch deleted file mode 100644 index c72078f3..00000000 --- a/unix/xorg-7.5-patches/0001-Add-dridir-param.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 0acffdd6f443198378012405e7f814f5abf278b3 Mon Sep 17 00:00:00 2001 -From: Adam Tkac <atkac@redhat.com> -Date: Wed, 15 Sep 2010 15:37:01 +0200 -Subject: [PATCH] Add -dridir parameter to specify DRI drivers directory from command line. - -Signed-off-by: Adam Tkac <atkac@redhat.com> ---- - glx/glxdri.c | 2 -- - glx/glxdri2.c | 2 -- - glx/glxdriswrast.c | 2 -- - glx/glxext.c | 27 +++++++++++++++++++++++++++ - glx/glxserver.h | 3 +++ - os/utils.c | 9 +++++++++ - 6 files changed, 39 insertions(+), 6 deletions(-) - -diff --git a/glx/glxdri.c b/glx/glxdri.c -index 5b78cec..ce29ae2 100644 ---- a/glx/glxdri.c -+++ b/glx/glxdri.c -@@ -860,8 +860,6 @@ static const __DRIextension *loader_extensions[] = { - - - --static const char dri_driver_path[] = DRI_DRIVER_PATH; -- - static Bool - glxDRIEnterVT (int index, int flags) - { -diff --git a/glx/glxdri2.c b/glx/glxdri2.c -index 2d6090c..49265ec 100644 ---- a/glx/glxdri2.c -+++ b/glx/glxdri2.c -@@ -579,8 +579,6 @@ static const __DRIextension *loader_extensions[] = { - NULL - }; - --static const char dri_driver_path[] = DRI_DRIVER_PATH; -- - static Bool - glxDRIEnterVT (int index, int flags) - { -diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c -index 6a34393..37c1dce 100644 ---- a/glx/glxdriswrast.c -+++ b/glx/glxdriswrast.c -@@ -438,8 +438,6 @@ initializeExtensions(__GLXDRIscreen *screen) - } - } - --static const char dri_driver_path[] = DRI_DRIVER_PATH; -- - static __GLXscreen * - __glXDRIscreenProbe(ScreenPtr pScreen) - { -diff --git a/glx/glxext.c b/glx/glxext.c -index 89e58b0..5e7cf23 100644 ---- a/glx/glxext.c -+++ b/glx/glxext.c -@@ -608,3 +608,30 @@ static int __glXDispatch(ClientPtr client) - - return retval; - } -+ -+char *dri_driver_path = DRI_DRIVER_PATH; -+ -+int GlxProcessArguments(int argc, char *argv[], int i) -+{ -+ if (strncmp(argv[i], "-dridir", 7) == 0) { -+ if (++i < argc) { -+#if !defined(WIN32) && !defined(__CYGWIN__) -+ if (getuid() != geteuid()) { -+ LogMessage(X_WARNING, "-dridir is not available for setuid X servers\n"); -+ return -1; -+ } else -+#endif -+ { -+ if (strlen(argv[i]) < PATH_MAX) { -+ dri_driver_path = argv[i]; -+ return 2; -+ } else { -+ LogMessage(X_ERROR, "-dridir pathname too long\n"); -+ return -1; -+ } -+ } -+ } -+ } -+ -+ return 0; -+} -diff --git a/glx/glxserver.h b/glx/glxserver.h -index 1daf977..082ff82 100644 ---- a/glx/glxserver.h -+++ b/glx/glxserver.h -@@ -251,4 +251,7 @@ extern unsigned glxMinorVersion; - - extern int __glXEventBase; - -+extern char *dri_driver_path; -+extern int GlxProcessArguments(int argc, char *argv[], int i); -+ - #endif /* !__GLX_server_h__ */ -diff --git a/os/utils.c b/os/utils.c -index 13d3b3f..ff97c86 100644 ---- a/os/utils.c -+++ b/os/utils.c -@@ -141,6 +141,7 @@ Bool noDPMSExtension = FALSE; - #ifdef GLXEXT - Bool noGlxExtension = FALSE; - Bool noGlxVisualInit = FALSE; -+extern int GlxProcessArguments(int argc, char *argv[], int i); - #endif - #ifdef SCREENSAVER - Bool noScreenSaverExtension = FALSE; -@@ -721,6 +722,14 @@ ProcessCommandLine(int argc, char *argv[]) - i+= skip-1; - else UseMsg(); - } -+#ifdef GLXEXT -+ else if ((skip = GlxProcessArguments(argc,argv,i)) != 0) { -+ if (skip > 0) -+ i += skip - 1; -+ else -+ UseMsg(); -+ } -+#endif - #ifdef RLIMIT_DATA - else if ( strcmp( argv[i], "-ld") == 0) - { --- -1.7.3.2 - diff --git a/unix/xorg-7.5-patches/0001-Add-xkbcompdir-param.patch b/unix/xorg-7.5-patches/0001-Add-xkbcompdir-param.patch deleted file mode 100644 index f7f358b4..00000000 --- a/unix/xorg-7.5-patches/0001-Add-xkbcompdir-param.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5e6e99eaef3ca346c78a3e520ed58ec8b8100b41 Mon Sep 17 00:00:00 2001 -From: Adam Tkac <atkac@redhat.com> -Date: Thu, 2 Sep 2010 17:24:38 +0200 -Subject: [PATCH] Add -xkbcompdir parameter to modify "xkbcomp" path from commandline. - -Signed-off-by: Adam Tkac <atkac@redhat.com> ---- - xkb/xkbInit.c | 21 +++++++++++++++++++++ - 1 files changed, 21 insertions(+), 0 deletions(-) - -diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c -index fbf8f14..29fb33e 100644 ---- a/xkb/xkbInit.c -+++ b/xkb/xkbInit.c -@@ -742,7 +742,28 @@ XkbProcessArguments(int argc,char *argv[],int i) - } - } - return j; -+ } else if (strncmp(argv[i], "-xkbcompdir", 11)==0) { -+ if (++i < argc) { -+#if !defined(WIN32) && !defined(__CYGWIN__) -+ if (getuid() != geteuid()) { -+ LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n"); -+ return -1; -+ } else -+#endif -+ { -+ if (strlen(argv[i]) < PATH_MAX) { -+ XkbBinDirectory = argv[i]; -+ return 2; -+ } else { -+ LogMessage(X_ERROR, "-xkbcompdir pathname too long\n"); -+ return -1; -+ } -+ } -+ } else { -+ return -1; -+ } - } -+ - if ((strcmp(argv[i], "-ardelay") == 0) || - (strcmp (argv[i], "-ar1") == 0)) { /* -ardelay int */ - if (++i >= argc) UseMsg (); --- -1.7.2.3 - diff --git a/unix/xserver/hw/vnc/Input.c b/unix/xserver/hw/vnc/Input.c index 88fa68e1..4c90a952 100644 --- a/unix/xserver/hw/vnc/Input.c +++ b/unix/xserver/hw/vnc/Input.c @@ -33,19 +33,11 @@ #include "inpututils.h" #endif #include "mi.h" -#if XORG >= 16 #include "exevents.h" -#endif -#if XORG == 16 -extern void -CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); -#endif -#if XORG >= 17 #include "xkbsrv.h" #include "xkbstr.h" #include "xserver-properties.h" extern _X_EXPORT DevPrivateKey CoreDevicePrivateKey; -#endif #include <X11/keysym.h> #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -53,9 +45,7 @@ extern _X_EXPORT DevPrivateKey CoreDevicePrivateKey; #define BUTTONS 7 /* Event queue is shared between all devices. */ -#if XORG == 15 -static xEvent *eventq = NULL; -#elif XORG < 111 +#if XORG < 111 static EventList *eventq = NULL; #endif @@ -67,10 +57,6 @@ static int cursorPosX, cursorPosY; static KeySym pressedKeys[256]; -#if XORG < 17 -extern void vncGetInitKeyboardMap(KeySymsPtr keysyms, CARD8 *modmap); -#endif - static int vncPointerProc(DeviceIntPtr pDevice, int onoff); static void vncKeyboardBell(int percent, DeviceIntPtr device, void * ctrl, int class); @@ -103,29 +89,6 @@ void vncInitInputDevice(void) for (i = 0;i < 256;i++) pressedKeys[i] = NoSymbol; -#if XORG < 17 - vncPointerDev = AddInputDevice( -#if XORG >= 16 - serverClient, -#endif - vncPointerProc, TRUE); - RegisterPointerDevice(vncPointerDev); - - vncKeyboardDev = AddInputDevice( -#if XORG >= 16 - serverClient, -#endif - vncKeyboardProc, TRUE); - RegisterKeyboardDevice(vncKeyboardDev); - - if (ActivateDevice(vncPointerDev) != Success || - ActivateDevice(vncKeyboardDev) != Success) - FatalError("Failed to activate TigerVNC devices\n"); - - if (!EnableDevice(vncPointerDev) || - !EnableDevice(vncKeyboardDev)) - FatalError("Failed to enable TigerVNC devices\n"); -#else /* < 17 */ ret = AllocDevicePair(serverClient, "TigerVNC", &vncPointerDev, &vncKeyboardDev, vncPointerProc, vncKeyboardProc, @@ -141,21 +104,12 @@ void vncInitInputDevice(void) if (!EnableDevice(vncPointerDev, TRUE) || !EnableDevice(vncKeyboardDev, TRUE)) FatalError("Failed to activate TigerVNC devices\n"); -#endif /* 17 */ #if XORG < 111 /* eventq is never free()-ed because it exists during server life. */ - if (eventq == NULL) { -#if XORG == 15 - eventq = (xEvent *)xcalloc(sizeof(xEvent), - GetMaximumEventsNum()); - if (!eventq) - FatalError("Couldn't allocate eventq\n"); -#else + if (eventq == NULL) GetEventList(&eventq); #endif - } -#endif vncPrepareInputDevices(); } @@ -250,15 +204,7 @@ static void enqueueEvents(DeviceIntPtr dev, int n) * good programming practise but in this case it is safe and * clear. */ - mieqEnqueue(dev, -#if XORG == 15 - eventq + i -#elif XORG == 16 - (eventq + i)->event -#else - (InternalEvent *) (eventq + i)->event -#endif - ); + mieqEnqueue(dev, (InternalEvent *) (eventq + i)->event); } } #endif /* XORG < 111 */ @@ -268,21 +214,18 @@ static int vncPointerProc(DeviceIntPtr pDevice, int onoff) BYTE map[BUTTONS + 1]; DevicePtr pDev = (DevicePtr)pDevice; int i; -#if XORG >= 17 /* * NOTE: map[] array is one element longer than btn_labels[] array. This * is not a bug. */ Atom btn_labels[BUTTONS]; Atom axes_labels[2]; -#endif switch (onoff) { case DEVICE_INIT: for (i = 0; i < BUTTONS + 1; i++) map[i] = i; -#if XORG >= 17 btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); @@ -293,20 +236,11 @@ static int vncPointerProc(DeviceIntPtr pDevice, int onoff) axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); -#endif - InitPointerDeviceStruct(pDev, map, BUTTONS, -#if XORG == 15 - GetMotionHistory, -#elif XORG >= 17 - btn_labels, -#endif + InitPointerDeviceStruct(pDev, map, BUTTONS, btn_labels, (PtrCtrlProcPtr)NoopDDA, - GetMotionHistorySize(), 2 -#if XORG >= 17 - , axes_labels -#endif - ); + GetMotionHistorySize(), + 2, axes_labels); break; case DEVICE_ON: pDev->on = TRUE; @@ -331,24 +265,11 @@ static void vncKeyboardBell(int percent, DeviceIntPtr device, static int vncKeyboardProc(DeviceIntPtr pDevice, int onoff) { -#if XORG < 17 - KeySymsRec keySyms; - CARD8 modMap[MAP_LENGTH]; -#endif DevicePtr pDev = (DevicePtr)pDevice; switch (onoff) { case DEVICE_INIT: -#if XORG < 17 - vncGetInitKeyboardMap(&keySyms, modMap); -#endif - InitKeyboardDeviceStruct( -#if XORG >= 17 - pDevice, NULL, -#else - pDev, &keySyms, modMap, -#endif - vncKeyboardBell, + InitKeyboardDeviceStruct(pDevice, NULL, vncKeyboardBell, (KbdCtrlProcPtr)NoopDDA); break; case DEVICE_ON: diff --git a/unix/xserver/hw/vnc/InputCore.c b/unix/xserver/hw/vnc/InputCore.c deleted file mode 100644 index 04677665..00000000 --- a/unix/xserver/hw/vnc/InputCore.c +++ /dev/null @@ -1,596 +0,0 @@ -/* Copyright (C) 2009 TightVNC Team - * Copyright (C) 2009 Red Hat, Inc. - * Copyright 2013-2015 Pierre Ossman for Cendio AB - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - * USA. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#include "Input.h" -#include "xorg-version.h" - -#include "inputstr.h" -#ifndef XKB_IN_SERVER -#define XKB_IN_SERVER -#endif -#ifdef XKB -/* - * This include is needed to use XkbConvertCase instead of XConvertCase even if - * we don't use XKB extension. - */ -#include <xkbsrv.h> -#endif -/* These defines give us access to all keysyms we need */ -#define XK_PUBLISHING -#define XK_TECHNICAL -#include <X11/keysym.h> -#include <X11/XF86keysym.h> -#include <X11/Xlib.h> -#include <X11/Xutil.h> - -extern DeviceIntPtr vncKeyboardDev; - -#if XORG < 17 - -#define IS_PRESSED(dev, keycode) \ - ((dev)->key->down[(keycode) >> 3] & (1 << ((keycode) & 7))) - -/* Fairly standard US PC Keyboard */ - -#define MIN_KEY 8 -#define MAX_KEY 255 -#define MAP_LEN (MAX_KEY - MIN_KEY + 1) -#define KEYSYMS_PER_KEY 2 -static KeySym keyboardMap[MAP_LEN * KEYSYMS_PER_KEY] = { - NoSymbol, NoSymbol, - XK_Escape, NoSymbol, - XK_1, XK_exclam, - XK_2, XK_at, - XK_3, XK_numbersign, - XK_4, XK_dollar, - XK_5, XK_percent, - XK_6, XK_asciicircum, - XK_7, XK_ampersand, - XK_8, XK_asterisk, - XK_9, XK_parenleft, - XK_0, XK_parenright, - XK_minus, XK_underscore, - XK_equal, XK_plus, - XK_BackSpace, NoSymbol, - XK_Tab, NoSymbol, - XK_q, XK_Q, - XK_w, XK_W, - XK_e, XK_E, - XK_r, XK_R, - XK_t, XK_T, - XK_y, XK_Y, - XK_u, XK_U, - XK_i, XK_I, - XK_o, XK_O, - XK_p, XK_P, - XK_bracketleft, XK_braceleft, - XK_bracketright, XK_braceright, - XK_Return, NoSymbol, - XK_Control_L, NoSymbol, - XK_a, XK_A, - XK_s, XK_S, - XK_d, XK_D, - XK_f, XK_F, - XK_g, XK_G, - XK_h, XK_H, - XK_j, XK_J, - XK_k, XK_K, - XK_l, XK_L, - XK_semicolon, XK_colon, - XK_apostrophe, XK_quotedbl, - XK_grave, XK_asciitilde, - XK_Shift_L, NoSymbol, - XK_backslash, XK_bar, - XK_z, XK_Z, - XK_x, XK_X, - XK_c, XK_C, - XK_v, XK_V, - XK_b, XK_B, - XK_n, XK_N, - XK_m, XK_M, - XK_comma, XK_less, - XK_period, XK_greater, - XK_slash, XK_question, - XK_Shift_R, NoSymbol, - XK_KP_Multiply, NoSymbol, - XK_Alt_L, XK_Meta_L, - XK_space, NoSymbol, - XK_Caps_Lock, NoSymbol, - XK_F1, NoSymbol, - XK_F2, NoSymbol, - XK_F3, NoSymbol, - XK_F4, NoSymbol, - XK_F5, NoSymbol, - XK_F6, NoSymbol, - XK_F7, NoSymbol, - XK_F8, NoSymbol, - XK_F9, NoSymbol, - XK_F10, NoSymbol, - XK_Num_Lock, XK_Pointer_EnableKeys, - XK_Scroll_Lock, NoSymbol, - XK_KP_Home, XK_KP_7, - XK_KP_Up, XK_KP_8, - XK_KP_Prior, XK_KP_9, - XK_KP_Subtract, NoSymbol, - XK_KP_Left, XK_KP_4, - XK_KP_Begin, XK_KP_5, - XK_KP_Right, XK_KP_6, - XK_KP_Add, NoSymbol, - XK_KP_End, XK_KP_1, - XK_KP_Down, XK_KP_2, - XK_KP_Next, XK_KP_3, - XK_KP_Insert, XK_KP_0, - XK_KP_Delete, XK_KP_Decimal, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - NoSymbol, NoSymbol, - XK_F11, NoSymbol, - XK_F12, NoSymbol, - XK_Home, NoSymbol, - XK_Up, NoSymbol, - XK_Prior, NoSymbol, - XK_Left, NoSymbol, - NoSymbol, NoSymbol, - XK_Right, NoSymbol, - XK_End, NoSymbol, - XK_Down, NoSymbol, - XK_Next, NoSymbol, - XK_Insert, NoSymbol, - XK_Delete, NoSymbol, - XK_KP_Enter, NoSymbol, - XK_Control_R, NoSymbol, - XK_Pause, XK_Break, - XK_Print, XK_Execute, - XK_KP_Divide, NoSymbol, - XK_Alt_R, XK_Meta_R, - NoSymbol, NoSymbol, - XK_Super_L, NoSymbol, - XK_Super_R, NoSymbol, - XK_Menu, NoSymbol, -}; - -void vncGetInitKeyboardMap(KeySymsPtr keysyms, CARD8 *modmap) -{ - int i; - - for (i = 0; i < MAP_LENGTH; i++) - modmap[i] = NoSymbol; - - for (i = 0; i < MAP_LEN; i++) { - switch (keyboardMap[i * KEYSYMS_PER_KEY]) { - case XK_Shift_L: - case XK_Shift_R: - modmap[i + MIN_KEY] = ShiftMask; - break; - case XK_Caps_Lock: - modmap[i + MIN_KEY] = LockMask; - break; - case XK_Control_L: - case XK_Control_R: - modmap[i + MIN_KEY] = ControlMask; - break; - case XK_Alt_L: - case XK_Alt_R: - modmap[i + MIN_KEY] = Mod1Mask; - break; - case XK_Num_Lock: - modmap[i + MIN_KEY] = Mod2Mask; - break; - /* No defaults for Mod3Mask yet */ - case XK_Super_L: - case XK_Super_R: - case XK_Hyper_L: - case XK_Hyper_R: - modmap[i + MIN_KEY] = Mod4Mask; - break; - case XK_ISO_Level3_Shift: - case XK_Mode_switch: - modmap[i + MIN_KEY] = Mod5Mask; - break; - } - } - - keysyms->minKeyCode = MIN_KEY; - keysyms->maxKeyCode = MAX_KEY; - keysyms->mapWidth = KEYSYMS_PER_KEY; - keysyms->map = keyboardMap; -} - -void vncPrepareInputDevices(void) -{ - /* Don't need to do anything here */ -} - -unsigned vncGetKeyboardState(void) -{ - return vncKeyboardDev->key->state; -} - -unsigned vncGetLevelThreeMask(void) -{ - int i, j, k; - - int minKeyCode, mapWidth; - KeySym *map; - - int maxKeysPerMod; - CARD8 *modmap; - - minKeyCode = vncKeyboardDev->key->curKeySyms.minKeyCode; - mapWidth = vncKeyboardDev->key->curKeySyms.mapWidth; - map = vncKeyboardDev->key->curKeySyms.map; - - maxKeysPerMod = vncKeyboardDev->key->maxKeysPerModifier; - modmap = vncKeyboardDev->key->modifierKeyMap; - - for (i = 3; i < 8; i++) { - for (k = 0; k < maxKeysPerMod; k++) { - int index = i * maxKeysPerMod + k; - int keycode = modmap[index]; - - if (keycode == 0) - continue; - - for (j = 0; j < mapWidth; j++) { - KeySym keysym; - keysym = map[(keycode - minKeyCode) * mapWidth + j]; - if (keysym == XK_Mode_switch) - return 1 << i; - } - } - } - - return 0; -} - -KeyCode vncPressShift(void) -{ - int maxKeysPerMod; - - maxKeysPerMod = vncKeyboardDev->key->maxKeysPerModifier; - return vncKeyboardDev->key->modifierKeyMap[ShiftMapIndex * maxKeysPerMod]; -} - -size_t vncReleaseShift(KeyCode *keys, size_t maxKeys) -{ - size_t count; - int maxKeysPerMod; - - count = 0; - maxKeysPerMod = vncKeyboardDev->key->maxKeysPerModifier; - for (int k = 0; k < maxKeysPerMod; k++) { - int keycode; - int index; - - index = ShiftMapIndex * maxKeysPerMod + k; - - keycode = vncKeyboardDev->key->modifierKeyMap[index]; - if (keycode == 0) - continue; - - if (!IS_PRESSED(vncKeyboardDev, keycode)) - continue; - - if (count >= maxKeys) - return 0; - - keys[count++] = keycode; - } - - return count; -} - -KeyCode vncPressLevelThree(void) -{ - unsigned mask, index; - int maxKeysPerMod; - - mask = getLevelThreeMask(); - if (mask == 0) - return 0; - - index = ffs(mask) - 1; - maxKeysPerMod = vncKeyboardDev->key->maxKeysPerModifier; - return vncKeyboardDev->key->modifierKeyMap[index * maxKeysPerMod]; -} - -size_t vncReleaseLevelThree(KeyCode *keys, size_t maxKeys) -{ - size_t count; - unsigned mask, msindex; - int maxKeysPerMod; - - mask = getLevelThreeMask(); - if (mask == 0) - return 0; - - msindex = ffs(mask) - 1; - - count = 0; - maxKeysPerMod = vncKeyboardDev->key->maxKeysPerModifier; - for (int k = 0; k < maxKeysPerMod; k++) { - int keycode; - int index; - - index = msindex * maxKeysPerMod + k; - - keycode = vncKeyboardDev->key->modifierKeyMap[index]; - if (keycode == 0) - continue; - - if (!IS_PRESSED(vncKeyboardDev, keycode)) - continue; - - if (count >= maxKeys) - return 0; - - keys[count++] = keycode; - } - - return count; -} - -static KeySym KeyCodetoKeySym(KeySymsPtr keymap, int keycode, int col) -{ - int per = keymap->mapWidth; - KeySym *syms; - KeySym lsym, usym; - - if ((col < 0) || ((col >= per) && (col > 3)) || - (keycode < keymap->minKeyCode) || (keycode > keymap->maxKeyCode)) - return NoSymbol; - - syms = &keymap->map[(keycode - keymap->minKeyCode) * per]; - if (col >= 4) - return syms[col]; - - if (col > 1) { - while ((per > 2) && (syms[per - 1] == NoSymbol)) - per--; - if (per < 3) - col -= 2; - } - - if ((per <= (col|1)) || (syms[col|1] == NoSymbol)) { - XkbConvertCase(syms[col&~1], &lsym, &usym); - if (!(col & 1)) - return lsym; - /* - * I'm commenting out this logic because it's incorrect even - * though it was copied from the Xlib sources. The X protocol - * book quite clearly states that where a group consists of - * element 1 being a non-alphabetic keysym and element 2 being - * NoSymbol that you treat the second element as being the - * same as the first. This also tallies with the behaviour - * produced by the installed Xlib on my linux box (I believe - * this is because it uses some XKB code rather than the - * original Xlib code - compare XKBBind.c with KeyBind.c in - * lib/X11). - */ -#if 0 - else if (usym == lsym) - return NoSymbol; -#endif - else - return usym; - } - - return syms[col]; -} - -KeyCode vncKeysymToKeycode(KeySym keysym, unsigned state, unsigned *new_state) -{ - int i, j; - unsigned mask; - - KeySymsPtr keymap; - int mapWidth; - - mask = vncGetLevelThreeMask(); - - keymap = &vncKeyboardDev->key->curKeySyms; - - /* - * Column 0 means both shift and "mode_switch" (AltGr) must be released, - * column 1 means shift must be pressed and mode_switch released, - * column 2 means shift must be released and mode_switch pressed, and - * column 3 means both shift and mode_switch must be pressed. - */ - j = 0; - if (state & ShiftMask) - j |= 0x1; - if (state & mask) - j |= 0x2; - - *new_state = state; - for (i = keymap->minKeyCode; i <= keymap->maxKeyCode; i++) { - if (KeyCodetoKeySym(keymap, i, j) == keysym) - return i; - } - - /* Only the first four columns have well-defined meaning */ - mapWidth = keymap->mapWidth; - if (mapWidth > 4) - mapWidth = 4; - - for (j = 0; j < mapWidth; j++) { - for (i = keymap->minKeyCode; i <= keymap->maxKeyCode; i++) { - if (KeyCodetoKeySym(keymap, i, j) == keysym) { - *new_state = state & ~(ShiftMask|mask); - if (j & 0x1) - *new_state |= ShiftMask; - if (j & 0x2) - *new_state |= mask; - - return i; - } - } - } - - return 0; -} - -int vncIsLockModifier(KeyCode keycode, unsigned state) -{ - int i, j, k; - - int minKeyCode, mapWidth; - KeySym *map; - - int maxKeysPerMod; - CARD8 *modmap; - - int num_lock_index; - - minKeyCode = vncKeyboardDev->key->curKeySyms.minKeyCode; - mapWidth = vncKeyboardDev->key->curKeySyms.mapWidth; - map = vncKeyboardDev->key->curKeySyms.map; - - maxKeysPerMod = vncKeyboardDev->key->maxKeysPerModifier; - modmap = vncKeyboardDev->key->modifierKeyMap; - - /* Caps Lock is fairly easy as it has a dedicated modmap entry */ - for (k = 0; k < maxKeysPerMod; k++) { - int index; - - index = LockMapIndex * maxKeysPerMod + k; - if (keycode == modmap[index]) - return 1; - } - - /* For Num Lock we need to find the correct modmap entry */ - num_lock_index = i; - for (i = 3; i < 8; i++) { - for (k = 0; k < maxKeysPerMod; k++) { - int index = i * maxKeysPerMod + k; - int keycode = modmap[index]; - - if (keycode == 0) - continue; - - for (j = 0; j < mapWidth; j++) { - KeySym keysym; - keysym = map[(keycode - minKeyCode) * mapWidth + j]; - if (keysym == XK_Num_Lock) { - num_lock_index = i; - goto done; - } - } - } - } -done: - - if (num_lock_index == 0) - return 0; - - /* Now we can look in the modmap */ - for (k = 0; k < maxKeysPerMod; k++) { - int index; - - index = num_lock_index * maxKeysPerMod + k; - if (keycode == modmap[index]) - return 1; - } - - return 0; -} - -int vncIsAffectedByNumLock(KeyCode keycode) -{ - KeySymsPtr keymap; - int i, per; - KeySym *syms; - - keymap = &vncKeyboardDev->key->curKeySyms; - per = keymap->mapWidth; - syms = &keymap->map[(keycode - keymap->minKeyCode) * per]; - - for (i = 0;i < per;i++) { - if (IsKeypadKey(syms[i])) - return 1; - if (IsPrivateKeypadKey(syms[i])) - return 1; - } - - return 0; -} - -KeyCode vncAddKeysym(KeySym keysym, unsigned state) -{ - KeyCode kc; - - int minKeyCode, maxKeyCode, mapWidth; - KeySym *map; - - minKeyCode = vncKeyboardDev->key->curKeySyms.minKeyCode; - maxKeyCode = vncKeyboardDev->key->curKeySyms.maxKeyCode; - mapWidth = vncKeyboardDev->key->curKeySyms.mapWidth; - map = vncKeyboardDev->key->curKeySyms.map; - - /* - * Magic, which dynamically adds keysym<->keycode mapping - * depends on X.Org version. Quick explanation of that "magic": - * - * 1.5 - * - has only one core keyboard so we have to keep core - * keyboard mapping synchronized with vncKeyboardDevice. Do - * it via SwitchCoreKeyboard() - * - * 1.6 (aka MPX - Multi pointer X) - * - multiple master devices (= core devices) exists, keep - * vncKeyboardDevice synchronized with proper master device - */ - for (kc = maxKeyCode; kc >= minKeyCode; kc--) { - DeviceIntPtr master; - - if (map[(kc - minKeyCode) * mapWidth] != 0) - continue; - - map[(kc - minKeyCode) * mapWidth] = keysym; - -#if XORG == 15 - master = inputInfo.keyboard; -#else - master = vncKeyboardDev->u.master; -#endif - void *slave = dixLookupPrivate(&master->devPrivates, - CoreDevicePrivateKey); - if (vncKeyboardDev == slave) { - dixSetPrivate(&master->devPrivates, - CoreDevicePrivateKey, NULL); -#if XORG == 15 - SwitchCoreKeyboard(vncKeyboardDev); -#else - CopyKeyClass(vncKeyboardDev, master); -#endif - } - - return kc; - } - - return 0; -} - -#endif - diff --git a/unix/xserver/hw/vnc/InputXKB.c b/unix/xserver/hw/vnc/InputXKB.c index 8d7ae569..490d6d19 100644 --- a/unix/xserver/hw/vnc/InputXKB.c +++ b/unix/xserver/hw/vnc/InputXKB.c @@ -24,8 +24,6 @@ #include "xorg-version.h" -#if XORG >= 17 - #include <stdio.h> #include <X11/keysym.h> @@ -655,5 +653,3 @@ static void vncXkbProcessDeviceEvent(int screenNum, ctrls->enabled_ctrls = backupctrls; } - -#endif /* XORG >= 117 */ diff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am index 7940f1b6..d7ab2595 100644 --- a/unix/xserver/hw/vnc/Makefile.am +++ b/unix/xserver/hw/vnc/Makefile.am @@ -16,7 +16,7 @@ HDRS = vncExtInit.h vncHooks.h \ libvnccommon_la_SOURCES = $(HDRS) vncExt.c vncExtInit.cc vncHooks.c \ vncBlockHandler.c XorgGlue.c RFBGlue.cc XserverDesktop.cc \ - Input.c InputCore.c InputXKB.c + Input.c InputXKB.c libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_H \ diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c index dc2b811a..5867aa00 100644 --- a/unix/xserver/hw/vnc/vncHooks.c +++ b/unix/xserver/hw/vnc/vncHooks.c @@ -96,10 +96,7 @@ typedef struct _vncHooksGCRec { #endif } vncHooksGCRec, *vncHooksGCPtr; -#if XORG == 15 -static DevPrivateKey vncHooksScreenPrivateKey = &vncHooksScreenPrivateKey; -static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey; -#elif XORG < 19 +#if XORG < 19 static int vncHooksScreenPrivateKeyIndex; static int vncHooksGCPrivateKeyIndex; static DevPrivateKey vncHooksScreenPrivateKey = &vncHooksScreenPrivateKeyIndex; @@ -133,11 +130,8 @@ static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w, #if XORG < 110 static RegionPtr vncHooksRestoreAreas(WindowPtr pWin, RegionPtr prgnExposed); #endif -static Bool vncHooksDisplayCursor( -#if XORG >= 16 - DeviceIntPtr pDev, -#endif - ScreenPtr pScreen, CursorPtr cursor); +static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr cursor); #if XORG <= 112 static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask); @@ -601,30 +595,20 @@ static RegionPtr vncHooksRestoreAreas(WindowPtr pWin, RegionPtr pRegion) // DisplayCursor - get the cursor shape -static Bool vncHooksDisplayCursor( -#if XORG >= 16 - DeviceIntPtr pDev, -#endif - ScreenPtr pScreen_, CursorPtr cursor) +static Bool vncHooksDisplayCursor(DeviceIntPtr pDev, + ScreenPtr pScreen_, CursorPtr cursor) { Bool ret; SCREEN_UNWRAP(pScreen_, DisplayCursor); - ret = (*pScreen->DisplayCursor) ( -#if XORG >= 16 - pDev, -#endif - pScreen, cursor); + ret = (*pScreen->DisplayCursor) (pDev, pScreen, cursor); -#if XORG >= 16 /* * XXX DIX calls this function with NULL argument to remove cursor sprite from * screen. Should we handle this in setCursor as well? */ - if (cursor != NullCursor) -#endif - { + if (cursor != NullCursor) { int width, height; int hotX, hotY; diff --git a/unix/xserver/hw/vnc/xorg-version.h b/unix/xserver/hw/vnc/xorg-version.h index 083c1b1e..8cc1c860 100644 --- a/unix/xserver/hw/vnc/xorg-version.h +++ b/unix/xserver/hw/vnc/xorg-version.h @@ -24,10 +24,8 @@ #include <dix-config.h> #endif -#if XORG_VERSION_CURRENT < ((1 * 10000000) + (5 * 100000) + (99 * 1000)) -#define XORG 15 -#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (6 * 100000) + (99 * 1000)) -#define XORG 16 +#if XORG_VERSION_CURRENT < ((1 * 10000000) + (6 * 100000) + (99 * 1000)) +#error "X.Org older than 1.7 is not supported" #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (7 * 100000) + (99 * 1000)) #define XORG 17 #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (8 * 100000) + (99 * 1000)) diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c index cc87efb0..6aad434b 100644 --- a/unix/xserver/hw/vnc/xvnc.c +++ b/unix/xserver/hw/vnc/xvnc.c @@ -80,11 +80,9 @@ from the X Consortium. #endif #include <X11/keysym.h> extern char buildtime[]; -#if XORG >= 17 #undef VENDOR_RELEASE #undef VENDOR_STRING #include "version-config.h" -#endif #include "site.h" #define XVNCVERSION "TigerVNC 1.4.80" @@ -848,39 +846,28 @@ vfbCrossScreen (ScreenPtr pScreen, Bool entering) { } -static Bool vfbRealizeCursor( -#if XORG >= 16 - DeviceIntPtr pDev, -#endif - ScreenPtr pScreen, CursorPtr pCursor) { +static Bool vfbRealizeCursor(DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor) +{ return TRUE; } -static Bool vfbUnrealizeCursor( -#if XORG >= 16 - DeviceIntPtr pDev, -#endif - ScreenPtr pScreen, CursorPtr pCursor) { +static Bool vfbUnrealizeCursor(DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor) +{ return TRUE; } -static void vfbSetCursor( -#if XORG >= 16 - DeviceIntPtr pDev, -#endif - ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +static void vfbSetCursor(DeviceIntPtr pDev, + ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { } -static void vfbMoveCursor( -#if XORG >= 16 - DeviceIntPtr pDev, -#endif - ScreenPtr pScreen, int x, int y) +static void vfbMoveCursor(DeviceIntPtr pDev, + ScreenPtr pScreen, int x, int y) { } -#if XORG >= 16 static Bool vfbDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { @@ -891,17 +878,14 @@ static void vfbDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { } -#endif static miPointerSpriteFuncRec vfbPointerSpriteFuncs = { vfbRealizeCursor, vfbUnrealizeCursor, vfbSetCursor, - vfbMoveCursor -#if XORG >= 16 - , vfbDeviceCursorInitialize, + vfbMoveCursor, + vfbDeviceCursorInitialize, vfbDeviceCursorCleanup -#endif }; static miPointerScreenFuncRec vfbPointerCursorFuncs = { @@ -1220,11 +1204,7 @@ static Bool vncRandRCrtcSet(ScreenPtr pScreen, RRCrtcPtr crtc, RRModePtr mode, } /* Let RandR know we approve, and let it update its internal state */ - ret = RRCrtcNotify(crtc, mode, x, y, rotation, -#if XORG >= 16 - NULL, -#endif - num_outputs, outputs); + ret = RRCrtcNotify(crtc, mode, x, y, rotation, NULL, num_outputs, outputs); if (!ret) return FALSE; @@ -1694,9 +1674,6 @@ Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) void ProcessInputEvents(void) { mieqProcessInputEvents(); -#if XORG == 15 - miPointerUpdate(); -#endif } // InitInput is called after InitExtensions, so we're guaranteed that diff --git a/unix/xserver15.patch b/unix/xserver15.patch deleted file mode 100644 index 7d8c94be..00000000 --- a/unix/xserver15.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -up xserver/configure.ac.vnc xserver/configure.ac ---- xserver/configure.ac.vnc 2011-05-11 11:02:51.229669941 +0200 -+++ xserver/configure.ac 2011-05-11 11:03:07.754072695 +0200 -@@ -31,7 +31,7 @@ RELEASE_DATE="5 November 2008" - REMEMBER_REMEMBER="The Fifth of November" - AC_CONFIG_SRCDIR([Makefile.am]) - AM_INIT_AUTOMAKE([dist-bzip2 foreign]) --AM_MAINTAINER_MODE -+m4_pattern_allow([AC_DEFINE]) - - dnl this gets generated by autoheader, and thus contains all the defines. we - dnl don't ever actually use it, internally. -@@ -54,6 +54,7 @@ dnl kdrive-config.h covers the kdrive DD - AC_CONFIG_HEADERS(include/kdrive-config.h) - - AC_PROG_CC -+AC_PROG_CXX - AM_PROG_AS - AC_PROG_INSTALL - AC_PROG_LN_S -@@ -1010,7 +1011,7 @@ AC_DEFINE(SHAPE, 1, [Support SHAPE exten - - AC_DEFINE(XKB, 1, [Build XKB]) - AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server]) --AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default]) -+AC_DEFINE(XKB_DFLT_DISABLED, 1, [Disable XKB per default]) - REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" - XKB_LIB='$(top_builddir)/xkb/libxkb.la' - XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' -@@ -1220,6 +1221,9 @@ if test "x$XVFB" = xyes; then - AC_SUBST([XVFB_SYS_LIBS]) - fi - -+dnl Xvnc DDX -+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC $RANDR_INC"]) -+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"]) - - dnl Xnest DDX - -@@ -1314,6 +1318,8 @@ xorg_bus_ppcpci=no - xorg_bus_sparcpci=no - xorg_bus_sparc=no - -+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) -+ - if test "x$XORG" = xyes -o "x$XGL" = xyes; then - XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' - XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' -@@ -1521,7 +1527,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xye - AC_DEFINE(XORGSERVER, 1, [Building Xorg server]) - AC_DEFINE(XFree86Server, 1, [Building XFree86 server]) - AC_DEFINE(XFree86LOADER, 1, [Building loadable XFree86 server]) -- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) - AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs]) - AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) - AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) -@@ -2184,6 +2189,7 @@ hw/dmx/input/Makefile - hw/dmx/glxProxy/Makefile - hw/dmx/Makefile - hw/vfb/Makefile -+hw/vnc/Makefile - hw/xgl/Makefile - hw/xgl/egl/Makefile - hw/xgl/egl/module/Makefile -diff -up xserver/hw/Makefile.am.vnc xserver/hw/Makefile.am ---- xserver/hw/Makefile.am.vnc 2011-05-11 11:02:51.809648976 +0200 -+++ xserver/hw/Makefile.am 2011-05-11 11:03:07.754072695 +0200 -@@ -43,7 +43,8 @@ SUBDIRS = \ - $(DMX_SUBDIRS) \ - $(KDRIVE_SUBDIRS) \ - $(XQUARTZ_SUBDIRS) \ -- $(XPRINT_SUBDIRS) -+ $(XPRINT_SUBDIRS) \ -+ vnc - - DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint - -diff -up xserver/mi/miinitext.c.vnc xserver/mi/miinitext.c ---- xserver/mi/miinitext.c.vnc 2011-05-11 11:02:53.156600294 +0200 -+++ xserver/mi/miinitext.c 2011-05-11 11:03:31.079229673 +0200 -@@ -292,6 +292,9 @@ extern void BigReqExtensionInit(INITARGS - #ifdef MITMISC - extern void MITMiscExtensionInit(INITARGS); - #endif -+#ifdef TIGERVNC -+extern void vncExtensionInit(INITARGS); -+#endif - #ifdef XIDLE - extern void XIdleExtensionInit(INITARGS); - #endif -@@ -566,6 +569,9 @@ InitExtensions(argc, argv) - #ifdef MITMISC - if (!noMITMiscExtension) MITMiscExtensionInit(); - #endif -+#ifdef TIGERVNC -+ vncExtensionInit(); -+#endif - #ifdef XIDLE - if (!noXIdleExtension) XIdleExtensionInit(); - #endif ---- xserver/os/WaitFor.c.orig 2011-10-07 12:57:57.000000000 +0200 -+++ xserver/os/WaitFor.c 2011-10-07 13:21:11.000000000 +0200 -@@ -125,6 +125,9 @@ - static void CheckAllTimers(void); - static OsTimerPtr timers = NULL; - -+extern void vncWriteBlockHandler(fd_set *fds); -+extern void vncWriteWakeupHandler(int nfds, fd_set *fds); -+ - /***************** - * WaitForSomething: - * Make the server suspend until there is -@@ -150,6 +153,7 @@ - INT32 timeout = 0; - fd_set clientsReadable; - fd_set clientsWritable; -+ fd_set socketsWritable; - int curclient; - int selecterr; - int nready; -@@ -220,23 +224,29 @@ - SmartScheduleStopTimer (); - - #endif -+ FD_ZERO(&socketsWritable); -+ vncWriteBlockHandler(&socketsWritable); - BlockHandler((pointer)&wt, (pointer)&LastSelectMask); - if (NewOutputPending) - FlushAllOutput(); - /* keep this check close to select() call to minimize race */ - if (dispatchException) - i = -1; -- else if (AnyClientsWriteBlocked) -- { -- XFD_COPYSET(&ClientsWriteBlocked, &clientsWritable); -- i = Select (MaxClients, &LastSelectMask, &clientsWritable, NULL, wt); -- } -- else -- { -- i = Select (MaxClients, &LastSelectMask, NULL, NULL, wt); -+ else { -+ if (AnyClientsWriteBlocked) -+ XFD_ORSET(&socketsWritable, &ClientsWriteBlocked, &socketsWritable); -+ -+ if (XFD_ANYSET(&socketsWritable)) { -+ i = Select (MaxClients, &LastSelectMask, &socketsWritable, NULL, wt); -+ if (AnyClientsWriteBlocked) -+ XFD_ANDSET(&clientsWritable, &socketsWritable, &ClientsWriteBlocked); -+ } else { -+ i = Select (MaxClients, &LastSelectMask, NULL, NULL, wt); -+ } - } - selecterr = GetErrno(); - WakeupHandler(i, (pointer)&LastSelectMask); -+ vncWriteWakeupHandler(i, &socketsWritable); - #ifdef SMART_SCHEDULE - SmartScheduleStartTimer (); - #endif diff --git a/unix/xserver16.patch b/unix/xserver16.patch deleted file mode 100644 index bbff2019..00000000 --- a/unix/xserver16.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -up xserver/configure.ac.vnc xserver/configure.ac ---- xserver/configure.ac.vnc 2011-05-11 11:06:29.966753119 +0200 -+++ xserver/configure.ac 2011-05-11 11:06:37.286488408 +0200 -@@ -29,7 +29,6 @@ AC_PREREQ(2.57) - AC_INIT([xorg-server], 1.6.5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) - AC_CONFIG_SRCDIR([Makefile.am]) - AM_INIT_AUTOMAKE([dist-bzip2 foreign]) --AM_MAINTAINER_MODE - - RELEASE_DATE="2009-10-11" - -@@ -52,6 +51,7 @@ dnl kdrive-config.h covers the kdrive DD - AC_CONFIG_HEADERS(include/kdrive-config.h) - - AC_PROG_CC -+AC_PROG_CXX - AM_PROG_AS - AC_PROG_INSTALL - AC_PROG_LN_S -@@ -995,7 +995,7 @@ AC_DEFINE(SHAPE, 1, [Support SHAPE exten - - AC_DEFINE(XKB, 1, [Build XKB]) - AC_DEFINE(XKB_IN_SERVER, 1, [Build XKB server]) --AC_DEFINE(XKB_DFLT_DISABLED, 0, [Disable XKB per default]) -+AC_DEFINE(XKB_DFLT_DISABLED, 1, [Disable XKB per default]) - REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" - XKB_LIB='$(top_builddir)/xkb/libxkb.la' - XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' -@@ -1199,6 +1199,9 @@ if test "x$XVFB" = xyes; then - AC_SUBST([XVFB_SYS_LIBS]) - fi - -+dnl Xvnc DDX -+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC $RANDR_INC"]) -+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB"]) - - dnl Xnest DDX - -@@ -1234,6 +1237,8 @@ xorg_bus_linuxpci=no - xorg_bus_bsdpci=no - xorg_bus_sparc=no - -+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) -+ - if test "x$XORG" = xyes; then - XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' - XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' -@@ -1421,7 +1426,6 @@ if test "x$XORG" = xyes; then - AC_DEFINE(XORGSERVER, 1, [Building Xorg server]) - AC_DEFINE(XFree86Server, 1, [Building XFree86 server]) - AC_DEFINE(XFree86LOADER, 1, [Building loadable XFree86 server]) -- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) - AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs]) - AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) - AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) -@@ -1875,6 +1879,7 @@ hw/dmx/input/Makefile - hw/dmx/glxProxy/Makefile - hw/dmx/Makefile - hw/vfb/Makefile -+hw/vnc/Makefile - hw/xnest/Makefile - hw/xwin/Makefile - hw/xquartz/Makefile -diff -up xserver/hw/Makefile.am.vnc xserver/hw/Makefile.am ---- xserver/hw/Makefile.am.vnc 2011-05-11 11:06:30.022751094 +0200 -+++ xserver/hw/Makefile.am 2011-05-11 11:06:37.286488408 +0200 -@@ -33,7 +33,8 @@ SUBDIRS = \ - $(XNEST_SUBDIRS) \ - $(DMX_SUBDIRS) \ - $(KDRIVE_SUBDIRS) \ -- $(XQUARTZ_SUBDIRS) -+ $(XQUARTZ_SUBDIRS) \ -+ vnc - - DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive - -diff -up xserver/mi/miinitext.c.vnc xserver/mi/miinitext.c ---- xserver/mi/miinitext.c.vnc 2011-05-11 11:06:30.127747296 +0200 -+++ xserver/mi/miinitext.c 2011-05-11 11:07:10.182298769 +0200 -@@ -272,6 +272,9 @@ extern void DamageExtensionInit(INITARGS - extern void CompositeExtensionInit(INITARGS); - #endif - extern void GEExtensionInit(INITARGS); -+#ifdef TIGERVNC -+extern void vncExtensionInit(INITARGS); -+#endif - - /* The following is only a small first step towards run-time - * configurable extensions. -@@ -438,6 +441,9 @@ InitExtensions(int argc, char *argv[]) - #ifdef XF86BIGFONT - if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit(); - #endif -+#ifdef TIGERVNC -+ vncExtensionInit(); -+#endif - #if !defined(NO_HW_ONLY_EXTS) - #if defined(XF86VIDMODE) - if (!noXFree86VidModeExtension) XFree86VidModeExtensionInit(); |