Unverified Commit 1391c0ad authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'sunweaver-pr/xinerama-xrandr' into 3.6.x

parents e4763fb4 c4a38893
......@@ -17,6 +17,7 @@ USRLIBDIR ?= $(LIBDIR)
INCLUDEDIR ?= $(PREFIX)/include
NXLIBDIR ?= $(PREFIX)/lib/nx
X2GOLIBDIR ?= $(PREFIX)/lib/x2go
X2GODATADIR ?= $(PREFIX)/share/x2go
CONFIGURE ?= ./configure
NX_VERSION_MAJOR=$(shell ./version.sh 1)
......@@ -154,14 +155,6 @@ install-full:
"$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/")"/ || true; \
done; \
# Provide means for Xinerama support in NX/X2Go sessions. This
# This also requires three post-install symlinks created by libnx-xinerama1:
# $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_X11.so.6 -> /usr/<libdir>/libX11.so.6
# $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libNX_Xext.so.6 -> /usr/<libdir>/libXext.so.6
# $(DESTDIR)$(NXLIBDIR)/X11/Xinerama/libXinerama.so.1 -> /usr/<libdir>/libNX_Xinerama.so.1
# Only create the owned directory here for nx-x11-common.
$(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11/Xinerama
$(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_NX)
$(INSTALL_DIR) $(DESTDIR)/$(ETCDIR_X2GO)
$(INSTALL_FILE) etc/keystrokes.cfg $(DESTDIR)/$(ETCDIR_NX)/
......@@ -171,6 +164,10 @@ install-full:
$(INSTALL_FILE) etc/nxagent.keyboard $(DESTDIR)$(ETCDIR_NX)/
$(INSTALL_FILE) etc/x2goagent.keyboard $(DESTDIR)$(ETCDIR_X2GO)/
# x2goagent.features file for X2Go
$(INSTALL_DIR) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/
$(INSTALL_FILE) x2goagent.features $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/
$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/x2go
$(INSTALL_SYMLINK) $(ETCDIR_X2GO)/rgb $(DESTDIR)$(PREFIX)/share/x2go/rgb
......@@ -199,6 +196,10 @@ uninstall-full:
$(RM_FILE) $(DESTDIR)$(X2GOLIBDIR)/bin/x2goagent
$(RM_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/
# x2goagent.features file for X2Go
$(RM_FILE) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/x2goagent.features
$(RM_DIR) $(DESTDIR)$(X2GODATADIR)/x2gofeature.d/
if test -d nx-X11; then \
if test -f nxcompext/Makefile; then ${MAKE} -C nxcompext $@; fi; \
if test -f nxcompshad/Makefile; then ${MAKE} -C nxcompshad $@; fi; \
......
......@@ -22,12 +22,11 @@ Build-Depends:
libxrandr-dev,
libxfixes-dev,
libxtst-dev,
libxinerama-dev,
autoconf,
pkg-config,
x11proto-core-dev,
expat,
Build-Conflicts:
x11proto-xinerama-dev,
Standards-Version: 3.9.6
Homepage: http://code.x2go.org/gitweb?p=nx-libs.git;a=summary
Vcs-Git: git://code.x2go.org/nx-libs.git
......@@ -548,21 +547,17 @@ Multi-Arch: same
Pre-Depends:
${misc:Pre-Depends},
Depends:
${shlibs:Depends},
${misc:Depends},
Breaks: nxlibs (<= 3.5.1),
libnx-x11 (<< 2:3.5.0.29-0x2go2~),
Description: nx-X11 Xinerama extension library
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
libNX_Xinerama provides an X Window System client interface to the XINERAMA
extension to the X protocol.
This package removes the obsoleted libNX_Xinerama.so.1 library.
Xinerama support in NX has been moved into nxagent whereas X-Clients
can now use the libXinerama library shipped with X.Org.
.
The Xinerama (also known as panoramiX) extension allows for multiple screens
attached to a single display to be treated as belonging together, and to give
desktop applications a better idea of the monitor layout.
This package can be safely removed.
Package: libnx-xinerama-dev
Provides: libnx-xinerama1-dev
......@@ -570,24 +565,16 @@ Section: libdevel
Architecture: any
Multi-Arch: same
Depends:
libnx-xinerama1 (= ${binary:Version}),
nx-x11proto-xinerama-dev (= ${binary:Version}),
${misc:Depends},
Breaks: nxlibs (<= 3.5.1),
libnx-x11-dev (<< 2:3.5.0.29-0x2go2~),
Description: nx-X11 Xinerama extension library (development headers)
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
libNX_Xinerama provides an X Window System client interface to the XINERAMA
extension to the X protocol.
This package removes the obsoleted headers for the libNX_Xinerama.so.1
library.
.
The Xinerama (also known as panoramiX) extension allows for multiple screens
attached to a single display to be treated as belonging together, and to give
desktop applications a better idea of the monitor layout.
.
This package contains the development headers for this library.
This package can be safely removed.
Package: nx-x11proto-xinerama-dev
Section: libdevel
......@@ -595,16 +582,15 @@ Architecture: any
Multi-Arch: same
Depends:
${misc:Depends},
Breaks: nxlibs (<= 3.5.1),
libnx-x11-dev (<< 2:3.5.0.29-0x2go2~),
Description: nx-X11 Xinerama extension wire protocol
NX is a software suite which implements very efficient
compression of the X11 protocol. This increases performance when
using X applications over a network, especially a slow one.
.
This package provides development headers describing the wire protocol
for the XINERAMA extension, used to use and manage a multiple-screen
display.
This package removes the obsoleted headers for the libNX_Xinerama.so.1
library.
.
This package can be safely removed.
Package: libnx-xinerama1-dbg
Architecture: any
......@@ -624,12 +610,10 @@ Description: nx-X11 Xinerama extension library (debug package)
libNX_Xinerama provides an X Window System client interface to the XINERAMA
extension to the X protocol.
.
The Xinerama (also known as panoramiX) extension allows for multiple
screens attached to a single display to be treated as belonging
together, and to give desktop applications a better idea of the monitor
layout.
This package removes the obsoleted debug symbols for the libNX_Xinerama.so.1
library.
.
This package contains debug symbols for this library.
This package can be safely removed.
Package: libnx-xpm4
Architecture: any
......
usr/lib/*/libNX_Xinerama.so
usr/include/*/nx-X11/extensions/Xinerama.h
usr/include/*/nx-X11/extensions/panoramiXext.h
usr/lib/*/libNX_Xinerama.so.*
libNX_Xinerama.so.1 libnx-xinerama1 #MINVER#
XPanoramiXAllocInfo@Base 3.5.0.29
XPanoramiXGetScreenCount@Base 3.5.0.29
XPanoramiXGetScreenSize@Base 3.5.0.29
XPanoramiXGetState@Base 3.5.0.29
XPanoramiXQueryExtension@Base 3.5.0.29
XPanoramiXQueryVersion@Base 3.5.0.29
XineramaIsActive@Base 3.5.0.29
XineramaQueryExtension@Base 3.5.0.29
XineramaQueryScreens@Base 3.5.0.29
XineramaQueryVersion@Base 3.5.0.29
usr/share/nx/SecurityPolicy
usr/lib/nx/X11/
usr/include/*/nx-X11/extensions/panoramiXproto.h
\ No newline at end of file
#!/bin/sh
# postinst script for nxagent
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
### FIXME: this is a work-around while we have not implemented
### multiarch support into the Debian source package of
### nx-libs.
libdir=/usr/lib/#DEB_BUILD_MULTIARCH#
mkdir -p /usr/lib/nx/X11/Xinerama/
# Already existent files are not removed.
# Users will need to explicitly remove them and (re-) configure this package.
if test -e $libdir/libX11.so.6; then
ln -sf $libdir/libX11.so.6 /usr/lib/nx/X11/Xinerama/libNX_X11.so.6
fi
if test -e $libdir/libXext.so.6; then
ln -sf $libdir/libXext.so.6 /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6
fi
if test -e $libdir/libNX_Xinerama.so.1; then
ln -sf $libdir/libNX_Xinerama.so.1 /usr/lib/nx/X11/Xinerama/libXinerama.so.1
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# prerm script for nxagent
#
# see: dh_installdeb(1)
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
set -e
case "$1" in
remove)
if test -d /usr/lib/nx/X11/Xinerama; then
if test -e /usr/lib/nx/X11/Xinerama/libNX_X11.so.6; then
rm -f /usr/lib/nx/X11/Xinerama/libNX_X11.so.6
fi
if test -e /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6; then
rm -f /usr/lib/nx/X11/Xinerama/libNX_Xext.so.6
fi
if test -e /usr/lib/nx/X11/Xinerama/libXinerama.so.1; then
rm -f /usr/lib/nx/X11/Xinerama/libXinerama.so.1
fi
rmdir --ignore-fail-on-non-empty /usr/lib/nx/X11/Xinerama
fi
;;
deconfigure|upgrade|failed-upgrade)
:
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
......@@ -20,7 +20,6 @@ override_dh_auto_clean:
override_dh_clean:
rm -f nx*/configure
. ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done
rm -f debian/nxagent.postinst
rm -fR .preserve/
dh_clean
......@@ -72,16 +71,12 @@ override_dh_auto_install:
override_dh_auto_build:
# let's prep the nxagent.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable
sed debian/nxagent.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/nxagent.postinst
LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS="$(LDFLAGS)" SHLIBDIR="$(LIBDIR)" PREFIX=/usr dh_auto_build --parallel
override_dh_strip:
dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg
dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg
dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg
dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg
dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg
dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg
dh_strip -plibxcompshad3 --dbg-package=libxcompshad3-dbg
......
......@@ -5,5 +5,6 @@ usr/share/x2go/rgb
usr/share/man/man1/x2goagent.1*
etc/x2go/rgb
usr/share/x2go/versions/VERSION.x2goagent
usr/share/x2go/x2gofeature.d/x2goagent.features
etc/x2go/keystrokes.cfg
etc/x2go/x2goagent.keyboard
......@@ -226,9 +226,6 @@ XORGRELSTRING = XorgManVersionString
#ifndef BuildXinerama
#define BuildXinerama NO
#endif
#ifndef BuildXineramaLibrary
#define BuildXineramaLibrary (BuildXinerama)
#endif
#ifndef BuildXCSecurity
#define BuildXCSecurity YES
#endif
......@@ -1321,30 +1318,6 @@ ProjectUnsharedLibReferences(XONLY,NX_X11,$(XLIBSRC),XBuildLibDir)
XLIBONLY = $(XONLYLIB)
LINTXONLYLIB = $(LINTXONLY)
#if BuildXineramaLibrary
#ifndef SharedLibXinerama
#define SharedLibXinerama HasSharedLibraries
#endif
#ifndef NormalLibXinerama
#define NormalLibXinerama (!SharedLibXinerama || ForceNormalLib)
#endif
#ifndef DebugLibXinerama
#define DebugLibXinerama NO
#endif
#ifndef ProfileLibXinerama
#define ProfileLibXinerama NO
#endif
#else
#undef SharedLibXinerama
#define SharedLibXinerama NO
#undef NormalLibXinerama
#define NormalLibXinerama NO
#undef DebugLibXinerama
#define DebugLibXinerama NO
#undef ProfileLibXinerama
#define ProfileLibXinerama NO
#endif
#if BuildRenderLibrary
#ifndef SharedLibXrender
#define SharedLibXrender HasSharedLibraries
......@@ -1395,16 +1368,6 @@ LINTEXTENSIONLIB = $(LINTEXTENSION)
XLIB = $(EXTENSIONLIB) $(XONLYLIB)
LINTXLIB = $(LINTXONLYLIB)
XINERAMALIBSRC = $(LIBSRC)/Xinerama
#if SharedLibXinerama
#ifndef SharedXineramaRev
#define SharedXineramaRev 1.0
#endif
SharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev)
#else
ProjectUnsharedLibReferences(XINERAMA,NX_Xinerama,$(XINERAMALIBSRC),XBuildLibDir)
#endif
XRENDERLIBSRC = $(LIBSRC)/Xrender
#if SharedLibXrender
#ifndef SharedXrenderRev
......
......@@ -35,8 +35,8 @@ XVMCHEADERS = XvMC.h XvMClib.h XvMCproto.h vldXvMC.h
#if BuildFontCache
FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h
#endif
#if BuildXinerama || BuildXineramaLibrary
XINERAMAHEADERS = Xinerama.h panoramiXext.h panoramiXproto.h
#if BuildXinerama
XINERAMAHEADERS = panoramiXext.h panoramiXproto.h
#endif
#if BuildRandR
RANDRHEADERS = randr.h randrproto.h
......
......@@ -15,10 +15,6 @@ NULL =
XKBLIBDIR = xkbfile
#endif
#if BuildXineramaLibrary
XINERAMADIR=Xinerama
#endif
#if BuildRenderLibrary
RENDERLIBDIR = Xrender
#endif
......
XCOMM $XFree86: xc/lib/Xinerama/Imakefile,v 1.4 2002/10/16 00:37:31 dawes Exp $
#define DoNormalLib NormalLibXinerama
#define DoSharedLib SharedLibXinerama
#define DoDebugLib DebugLibXinerama
#define DoProfileLib ProfileLibXinerama
#define LibName NX_Xinerama
#define SoRev SOXINERAMAREV
#define LibHeaders NO
#include <Threads.tmpl>
#ifdef SharedXineramaReqs
REQUIREDLIBS = SharedXineramaReqs
#endif
#if Malloc0ReturnsNull
ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
#endif
DEFINES = $(ALLOC_DEFINES)
SRCS = Xinerama.c
OBJS = Xinerama.o
LINTLIBS = $(LINTXLIB)
#define IncludeSharedObjectInNormalLib
#include <Library.tmpl>
DependTarget()
LIBRARY Xinerama
VERSION LIBRARY_VERSION
EXPORTS
XPanoramiXAllocInfo
XPanoramiXGetScreenCount
XPanoramiXGetScreenSize
XPanoramiXGetState
XPanoramiXQueryExtension
XPanoramiXQueryVersion
XineramaIsActive
XineramaQueryExtension
XineramaQueryScreens
XineramaQueryVersion
/* $XFree86$ */
......@@ -413,7 +413,7 @@ NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext \
#else
NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -L ../../../nxcompshad \
-lXcomp -lXcompext -lXcompshad -lNX_Xrender -lNX_X11 -lNX_Xext -lXfixes -lXfont \
-L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lNX_Xinerama -lXdmcp \
-L../../../nx-X11/exports/lib -lXtst -lXrandr -lXcomposite -lXinerama -lXdmcp \
`pkg-config --libs libxml-2.0`
#endif
......
......@@ -42,6 +42,7 @@ is" without express or implied warranty.
#include "screenint.h"
#include "input.h"
#include "misc.h"
#include "globals.h"
#include "scrnintstr.h"
#include "dixstruct.h"
#include "servermd.h"
......@@ -1202,6 +1203,36 @@ static void nxagentParseOptions(char *name, char *value)
return;
}
else if (!strcmp(name, "xinerama"))
{
#ifdef PANORAMIX
if (!PanoramiXExtensionDisabledHack)
{
if (!strcmp(value, "1"))
{
nxagentChangeOption(Xinerama, 1);
}
else if (!strcmp(value, "0"))
{
nxagentChangeOption(Xinerama, 0);
}
else
{
fprintf(stderr, "Warning: Ignoring bad value '%s' for option 'xinerama'.\n",
validateString(value));
}
}
else
{
nxagentChangeOption(Xinerama, 0);
fprintf(stderr, "Warning: Xinerama extension has been disabled via -disablexineramaextension cmdline switch.\n");
}
#else
nxagentChangeOption(Xinerama, 0);
fprintf(stderr, "Warning: No Xinerama support compiled into nxagent.\n")
#endif /* of PANORAMIX */
return;
}
else if (!strcmp(name, "resize"))
{
if (nxagentOption(DesktopResize) == 0 || strcmp(value, "0") == 0)
......
......@@ -568,6 +568,10 @@ void nxagentSwitchResizeMode(ScreenPtr pScreen)
{
XSizeHints sizeHints;
#ifdef DEBUG
fprintf(stderr, "nxagentSwitchResizeMode called.\n");
#endif
int desktopResize = nxagentOption(DesktopResize);
nxagentChangeOption(DesktopResize, !desktopResize);
......@@ -3366,7 +3370,9 @@ int nxagentHandleConfigureNotify(XEvent* X)
if (nxagentOption(DesktopResize) == 1)
{
if (nxagentOption(Width) != X -> xconfigure.width ||
nxagentOption(Height) != X -> xconfigure.height)
nxagentOption(Height) != X -> xconfigure.height ||
nxagentOption(X) != X -> xconfigure.x ||
nxagentOption(Y) != X -> xconfigure.y)
{
Bool newEvents = False;
......@@ -3423,11 +3429,16 @@ int nxagentHandleConfigureNotify(XEvent* X)
nxagentMoveViewport(pScreen, 0, 0);
/* if in shadowing mode or if neither size nor position have
changed we do not need to adjust RandR */
/* FIXME: Comment makes no sense */
if (nxagentOption(Shadow) == 1 ||
(nxagentOption(Width) == nxagentOption(RootWidth) &&
nxagentOption(Height) == nxagentOption(RootHeight)))
nxagentOption(Height) == nxagentOption(RootHeight) &&
nxagentOption(X) == nxagentOption(RootX) &&
nxagentOption(Y) == nxagentOption(RootY)))
{
doRandR = 0;
doRandR = False;
}
nxagentChangeOption(Width, X -> xconfigure.width);
......@@ -3466,12 +3477,31 @@ int nxagentHandleConfigureNotify(XEvent* X)
#endif
nxagentChangeScreenConfig(0, nxagentOption(Width),
nxagentOption(Height), 0, 0);
nxagentOption(Height), 0, 0);
}
}
return 1;
}
else
{
if ( (X -> xconfigure.window == DefaultRootWindow(nxagentDisplay)) || nxagentFullscreenWindow )
{
#ifdef TEST
fprintf(stderr, "nxagentHandleConfigureNotify: remote root window has changed: %d,%d %dx%d\n", X -> xconfigure.x, X -> xconfigure.y, X -> xconfigure.width, X -> xconfigure.height);
#endif
nxagentChangeOption(RootX, X -> xconfigure.x);
nxagentChangeOption(RootY, X -> xconfigure.y);
nxagentChangeOption(RootWidth, X -> xconfigure.width);
nxagentChangeOption(RootHeight, X -> xconfigure.height);
nxagentChangeScreenConfig(0, nxagentOption(Width),
nxagentOption(Height), 0, 0);
return 1;
}
}
}
return 0;
......@@ -4416,6 +4446,10 @@ int nxagentHandleRRScreenChangeNotify(XEvent *X)
{
XRRScreenChangeNotifyEvent *Xr;
#ifdef DEBUG
fprintf(stderr, "nxagentHandleRRScreenChangeNotify called.\n");
#endif
Xr = (XRRScreenChangeNotifyEvent *) X;
nxagentResizeScreen(screenInfo.screens[DefaultScreen(nxagentDisplay)], Xr -> width, Xr -> height,
......@@ -4504,6 +4538,10 @@ int nxagentWaitEvents(Display *dpy, struct timeval *tm)
{
XEvent ev;
#ifdef DEBUG
fprintf(stderr, "nxagentWaitEvents called.\n");
#endif
NXFlushDisplay(dpy, NXFlushLink);
/*
......
......@@ -35,6 +35,13 @@ static int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width,
static int nxagentRandRInitSizes(ScreenPtr pScreen);
#if RANDR_12_INTERFACE
static Bool nxagentRandRCrtcSet (ScreenPtr pScreen, RRCrtcPtr crtc,
RRModePtr mode, int x, int y,
Rotation rotation, int numOutputs,
RROutputPtr *outputs);
#endif
#ifdef __DARWIN__
void DarwinHandleGUI(int argc, char *argv[])
......@@ -83,6 +90,8 @@ void nxagentInitRandRExtension(ScreenPtr pScreen)
fprintf(stderr, "Warning: Failed to initialize the RandR extension.\n");
}
/* FIXME: do we need this at all with the new rand/xinerama stuff? */
nxagentRandRInitSizes(pScreen);
/*
......@@ -97,6 +106,7 @@ void nxagentInitRandRExtension(ScreenPtr pScreen)
#if RANDR_12_INTERFACE
pRandRScrPriv -> rrScreenSetSize = nxagentRandRScreenSetSize;
pRandRScrPriv -> rrCrtcSet = nxagentRandRCrtcSet;
#endif
#if RANDR_10_INTERFACE
......@@ -104,6 +114,34 @@ void nxagentInitRandRExtension(ScreenPtr pScreen)
#endif
}
void
RRResetProc (ExtensionEntry *extEntry)
{
fprintf(stderr, "RANDR going down - NX version\n");
}
#if RANDR_12_INTERFACE
/*
* Request that the Crtc be reconfigured
*/
static Bool
nxagentRandRCrtcSet (ScreenPtr pScreen,
RRCrtcPtr crtc,
RRModePtr mode,
int x,
int y,
Rotation rotation,
int numOutputs,
RROutputPtr *outputs)
{
return RRCrtcNotify(crtc, mode, x, y, rotation, numOutputs, outputs);
}
#endif
int nxagentRandRGetInfo(ScreenPtr pScreen, Rotation *pRotations)
{
/*
......
......@@ -179,7 +179,8 @@ INCLUDES = -I. -I$(XBUILDINCDIR) \
# NXAGENT_CLIPBOARD Enables clipboard cut and paste function between X servers.
# NXAGENT_FONTEXCLUDE Exclude some specific font names (only "-ult1mo" at this moment).
# NXAGENT FULLSCREEN Fullscreen mode
#
# NXAGENT_RANDR_MODE_PREFIX Use prefixed (i.e., nx_<x>x<y>) RandR modes
# NXAGENT_RANDR_XINERAMA_CLIPPING cut off invisible window parts in xinerama mode (you probably do not want this)
#if nxVersion
NX_DEFINES=-DNX_VERSION_CURRENT="$(NX_VERSION_CURRENT)" \
......@@ -203,6 +204,7 @@ DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(NX_DEFINES) \
-DNXAGENT_ONSTART \
-DNXAGENT_SPLASH \
-DNXAGENT_ARTSD \
-DNXAGENT_RANDR_MODE_PREFIX \
-UNX_DEBUG_INPUT \
-DRANDR_10_INTERFACE \
-DRANDR_12_INTERFACE \
......
......@@ -154,6 +154,8 @@ void nxagentInitOptions()
nxagentOptions.CopyBufferSize = COPY_UNLIMITED;
nxagentOptions.ImageRateLimit = 0;
nxagentOptions.Xinerama = 0;
}
/*
......
......@@ -388,6 +388,17 @@ typedef struct _AgentOptions
int NoRootlessExit;
/*
* Store if the user wants Xinerama. There's a variable called
* noPanoramiXExtension in os/utils.c but we cannot rely on that
* because RandR and Panoramix change its value when trying to
* initialize. So we use this variable to save the user preference
* provided by the -/+xinerama parameter before initalizing those
* extensions.
*/
int Xinerama;
} AgentOptionsRec;
typedef AgentOptionsRec *AgentOptionsPtr;
......
......@@ -624,7 +624,7 @@ Bool nxagentReconnectSession(void)
nxagentRedirectDefaultWindows();
if (nxagentResizeDesktopAtStartup || nxagentOption(Rootless) == True)
if (nxagentResizeDesktopAtStartup || nxagentOption(Rootless) == True || nxagentOption(Xinerama) == True)
{
nxagentChangeScreenConfig(0, nxagentOption(RootWidth),
nxagentOption(RootHeight), 0, 0);
......
......@@ -46,6 +46,7 @@ extern Bool PanoramiXMapped;
extern Bool PanoramiXVisibilityNotifySent;
extern Bool PanoramiXWindowExposureSent;
extern Bool PanoramiXOneExposeRequest;
extern Bool PanoramiXExtensionDisabledHack;
#endif
#ifdef BIGREQS
......
......@@ -701,6 +701,7 @@ void UseMsg(void)
#ifdef PANORAMIX
ErrorF("+xinerama Enable XINERAMA extension\n");
ErrorF("-xinerama Disable XINERAMA extension\n");
ErrorF("-disablexineramaextension Disable XINERAMA extension\n");
#endif
#ifdef SMART_SCHEDULE
ErrorF("-dumbSched Disable smart scheduling, enable old behavior\n");
......
......@@ -104,11 +104,13 @@ RRModeCreate (xRRModeInfo *modeInfo,
}
modes = newModes;
modes[num_modes++] = mode;
/*
* give the caller a reference to this mode
*/
++mode->refcnt;
#ifdef DEBUG
fprintf(stderr, "RRModeCreate: num_modes [%d] new mode [%s] ([%p]) refcnt [%d]\n", num_modes, mode->name, mode, mode->refcnt);
#endif
return mode;
}
......@@ -144,11 +146,22 @@ RRModeGet (xRRModeInfo *modeInfo,
!memcmp (name, mode->name, modeInfo->nameLength))
{
++mode->refcnt;
#ifdef DEBUG
fprintf(stderr, "RRModeGet: return existing mode [%s] ([%p]) refcnt [%d]\n", mode->name, mode, mode->refcnt);
#endif
return mode;
}
}
#ifdef DEBUG
{
RRModePtr mode = RRModeCreate (modeInfo, name, NULL);
fprintf(stderr, "RRModeGet: return new mode [%s] ([%p]) refcnt [%d]\n", mode->name, mode, mode->refcnt);
return mode;
}
#else
return RRModeCreate (modeInfo, name, NULL);
#endif
}
static RRModePtr
......@@ -252,8 +265,12 @@ RRModeDestroy (RRModePtr mode)
{
int m;
if (--mode->refcnt > 0)
if (--mode->refcnt > 0) {
#ifdef DEBUG
fprintf(stderr, "RRModeDestroy: mode [%s] ([%p]) refcnt [%d -> %d]\n", mode->name, mode, mode->refcnt + 1, mode->refcnt);
#endif
return;
}
for (m = 0; m < num_modes; m++)
{
if (modes[m] == mode)
......@@ -270,12 +287,18 @@ RRModeDestroy (RRModePtr mode)
}
}
#ifdef DEBUG
fprintf(stderr, "RRModeDestroy: destroyed mode [%s] ([%p])\n", mode->name, mode);
#endif
xfree (mode);
}
static int
RRModeDestroyResource (void * value, XID pid)
{
#ifdef DEBUG
fprintf(stderr, "RRModeDestroyResource: mode [%s] ([%p]) refcnt [%d]\n", ((RRModePtr)value)->name, (RRModePtr)value, ((RRModePtr)value)->refcnt);
#endif
RRModeDestroy ((RRModePtr) value);
return 1;
}
......
......@@ -39,6 +39,7 @@ BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(xinerama)
%else
BuildRequires: libexpat-devel
BuildRequires: libpng-devel
......@@ -53,6 +54,7 @@ BuildRequires: xorg-x11-libXcomposite-devel
BuildRequires: xorg-x11-libXrandr-devel
BuildRequires: xorg-x11-libXfixes-devel
BuildRequires: xorg-x11-libXtst-devel
BuildRequires: xorg-x11-libXinerama-devel
%endif
BuildRequires: xorg-x11-util-devel
%endif
......@@ -67,6 +69,7 @@ BuildRequires: libXcomposite-devel
BuildRequires: libXrandr-devel
BuildRequires: libXfixes-devel
BuildRequires: libXtst-devel
BuildRequires: libXinerama-devel
%endif
# For imake
......@@ -84,20 +87,6 @@ Provides: nx = %{version}-%{release}
Obsoletes: nx%{?_isa} < 3.5.0-19
Provides: nx%{?_isa} = %{version}-%{release}
# for Xinerama in NX to work:
%if 0%{?suse_version}
%if 0%{?suse_version} < 1140
Requires: xorg-x11-libX11%{?_isa}
Requires: xorg-x11-libXext%{?_isa}
%else
Requires: libX11-6%{?_isa}
Requires: libXext6%{?_isa}
%endif
%else
Requires: libX11%{?_isa}
Requires: libXext%{?_isa}
%endif
%if 0%{?el5}
# For compatibility with EPEL5
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
......@@ -244,22 +233,6 @@ The NX_Xext library contains a handful of X11 extensions:
- X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf)
%package -n libNX_Xinerama1
Group: System Environment/Libraries
Summary: Xinerama extension to the NX Protocol
Requires: %{name}%{?_isa} >= 3.5.0.29
Obsoletes: libNX_Xinerama
%description -n libNX_Xinerama1
NX is a software suite which implements very efficient compression of
the X11 protocol. This increases performance when using X
applications over a network, especially a slow one.
Xinerama is an extension to the X Window System which enables
multi-headed X applications and window managers to use two or more
physical displays as one large virtual display.
%package -n libNX_Xrender-devel
Group: Development/Libraries
Summary: Development files for the NX Render Extension library
......@@ -553,11 +526,6 @@ rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XK*.h
rm -r %{buildroot}%{_includedir}/nx-X11/extensions/*Xv*.h
rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans
# Needed for Xinerama support
ln -s -f ../../../../%{_lib}/libX11.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama/libNX_X11.so.6
ln -s -f ../../../../%{_lib}/libXext.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama/libNX_Xext.so.6
ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/Xinerama/libXinerama.so.1
%if 0%{?fdupes:1}
%fdupes %buildroot/%_prefix
%endif
......@@ -566,7 +534,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X
%post -n libNX_X11-6 -p /sbin/ldconfig
%post -n libNX_Xau6 -p /sbin/ldconfig
%post -n libNX_Xext6 -p /sbin/ldconfig
%post -n libNX_Xinerama1 -p /sbin/ldconfig
%post -n libNX_Xrender1 -p /sbin/ldconfig
%post -n libXcomp3 -p /sbin/ldconfig
%post -n libXcompext3 -p /sbin/ldconfig
......@@ -575,7 +542,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X
%postun -n libNX_X11-6 -p /sbin/ldconfig
%postun -n libNX_Xau6 -p /sbin/ldconfig
%postun -n libNX_Xext6 -p /sbin/ldconfig
%postun -n libNX_Xinerama1 -p /sbin/ldconfig
%postun -n libNX_Xrender1 -p /sbin/ldconfig
%postun -n libXcomp3 -p /sbin/ldconfig
%postun -n libXcompext3 -p /sbin/ldconfig
......@@ -654,10 +620,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X
%defattr(-,root,root)
%{_libdir}/libNX_Xext.so.6*
%files -n libNX_Xinerama1
%defattr(-,root,root)
%{_libdir}/libNX_Xinerama.so.1*
%files -n libNX_Xrender-devel
%defattr(-,root,root)
%{_libdir}/libNX_Xrender.so
......@@ -722,7 +684,6 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X
%files devel
%defattr(-,root,root)
%{_libdir}/libNX_Xinerama.so
%{_includedir}/nx-X11/X10.h
%dir %{_includedir}/nx-X11/extensions
%{_includedir}/nx-X11/extensions/Xevie.h
......
......@@ -306,6 +306,7 @@ clipboard=n\n\
streaming=n\n\
backingstore=n\n\
composite=n\n\
xinerama=n\n\
shmem=b\n\
shpix=b\n\
kbtype=s\n\
......
#!/bin/bash
# Copyright (C) 2015, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
#
# This program 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 program 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 program; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
# silently bail out if X2Go Server is not installed
if ! which x2gopath 1>/dev/null; then
exit 0
fi
X2GO_LIB_PATH="$(x2gopath libexec)";
$X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@"
X2GO_FEATURE=$1
# check for X2Go Agent features
case "$X2GO_FEATURE" in
"X2GOAGENT_RANDRXINERAMA") echo "ok"; exit 0;;
*) exit -1;;
esac
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment