Index: unix/xserver/hw/vnc/xvnc.cc =================================================================== --- unix/xserver/hw/vnc/xvnc.cc (revision 3883) +++ unix/xserver/hw/vnc/xvnc.cc (revision 3884) @@ -37,6 +37,7 @@ #include #include #include "vncExtInit.h" +#include "xorg-version.h" extern "C" { #define class c_class Index: unix/xserver/hw/vnc/xorg-version.h =================================================================== --- unix/xserver/hw/vnc/xorg-version.h (revision 0) +++ unix/xserver/hw/vnc/xorg-version.h (revision 3884) @@ -0,0 +1,33 @@ +/* Copyright (C) 2009 TightVNC Team + * Copyright (C) 2009 Red Hat, Inc. + * + * 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. + */ + +#ifndef XORG_VERSION_H +#define XORG_VERSION_H + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#if XORG_VERSION_CURRENT < ((1 * 10000000) + (5 * 100000) + (99 * 1000)) +#define XORG 15 +#else +#define XORG 16 +#endif + +#endif Index: unix/xserver/hw/vnc/Makefile.am =================================================================== --- unix/xserver/hw/vnc/Makefile.am (revision 3883) +++ unix/xserver/hw/vnc/Makefile.am (revision 3884) @@ -9,7 +9,7 @@ noinst_LTLIBRARIES = libvnccommon.la -HDRS = RegionHelper.h vncExtInit.h vncHooks.h XserverDesktop.h +HDRS = RegionHelper.h vncExtInit.h vncHooks.h XserverDesktop.h xorg-version.h libvnccommon_la_SOURCES = $(HDRS) vncExtInit.cc vncHooks.cc XserverDesktop.cc Index: unix/xserver/hw/vnc/XserverDesktop.cc =================================================================== --- unix/xserver/hw/vnc/XserverDesktop.cc (revision 3883) +++ unix/xserver/hw/vnc/XserverDesktop.cc (revision 3884) @@ -41,6 +41,7 @@ #include #include "XserverDesktop.h" #include "vncExtInit.h" +#include "xorg-version.h" extern "C" { #define public c_public Index: unix/xserver/hw/vnc/XserverDesktop.h =================================================================== --- unix/xserver/hw/vnc/XserverDesktop.h (revision 3883) +++ unix/xserver/hw/vnc/XserverDesktop.h (revision 3884) @@ -26,15 +26,6 @@ #include #endif -#if XORG_VERSION_CURRENT < \ - ((1 * 10000000) + (5 * 100000) + (99 * 1000)) -/* Xorg 1.5 branch */ -#define XORG 15 -#else -/* Xorg 1.6 branch */ -#define XORG 16 -#endif - #include #include #include Index: unix/xserver/hw/vnc/vncHooks.cc =================================================================== --- unix/xserver/hw/vnc/vncHooks.cc (revision 3883) +++ unix/xserver/hw/vnc/vncHooks.cc (revision 3884) @@ -25,6 +25,7 @@ #include "XserverDesktop.h" #include "vncHooks.h" #include "vncExtInit.h" +#include "xorg-version.h" extern "C" { #define class c_class