aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--X11/extensions/lbxbuf.h51
-rw-r--r--X11/extensions/lbxbufstr.h45
-rw-r--r--X11/extensions/lbximage.h151
-rw-r--r--filesthatshouldbethesame.py3
-rw-r--r--libxcb/src/xcb_util.c46
-rw-r--r--xorg-server/configure.ac4
-rw-r--r--xorg-server/dix/devices.c2
-rw-r--r--xorg-server/glx/glxscreens.c6
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c107
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c6
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c2
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.c26
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.h85
13 files changed, 157 insertions, 377 deletions
diff --git a/X11/extensions/lbxbuf.h b/X11/extensions/lbxbuf.h
deleted file mode 100644
index 63983df16..000000000
--- a/X11/extensions/lbxbuf.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* $Xorg: lbxbuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
-/*
- * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name Network Computing Devices, Inc. not be
- * used in advertising or publicity pertaining to distribution of this
- * software without specific, written prior permission.
- *
- * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
- * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
- * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
- * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
- * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE,
- * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND
- * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- */
-
-#ifndef _BUFFER_H_
-#define _BUFFER_H_
-
-#define INBUFFER_SIZE (1 << 13) /* 8K */
-#define OUTBUFFER_SIZE (1 << 12) /* 4K */
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-typedef struct _zlibbuffer *ZlibBufferPtr;
-
-#include <X11/Xfuncproto.h>
-
-_XFUNCPROTOBEGIN
-
-extern int InitZlibBuffer(ZlibBufferPtr b, int size);
-extern void FreeZlibBuffer(ZlibBufferPtr b);
-extern char *ReserveOutBuf(ZlibBufferPtr outbuf, int outlen);
-
-_XFUNCPROTOEND
-
-#endif /* _BUFFER_H_ */
diff --git a/X11/extensions/lbxbufstr.h b/X11/extensions/lbxbufstr.h
deleted file mode 100644
index e1a06f633..000000000
--- a/X11/extensions/lbxbufstr.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
-/*
- * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and
- * its documentation for any purpose is hereby granted without fee, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name Network Computing Devices, Inc. not be
- * used in advertising or publicity pertaining to distribution of this
- * software without specific, written prior permission.
- *
- * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
- * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
- * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
- * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
- * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE,
- * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND
- * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- */
-/* $XFree86$ */
-
-#ifndef _BUFFERSTR_H_
-#define _BUFFERSTR_H_
-
-#include <X11/extensions/lbxbuf.h>
-
-/*
- * ZLIB Input/Output buffer
- */
-typedef struct _zlibbuffer {
- char *bufbase;
- char *bufend;
- char *bufptr;
- int bufcnt;
-} ZlibBuffer;
-
-#define BYTES_AVAIL(inbuf, len) \
- (((inbuf)->bufcnt >= (len)) ? (inbuf)->bufptr : NULL)
-
-#endif /* _BUFFERSTR_H_ */
diff --git a/X11/extensions/lbximage.h b/X11/extensions/lbximage.h
deleted file mode 100644
index 10627cf29..000000000
--- a/X11/extensions/lbximage.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
-
-/******************************************************************************
-
-Copyright 1994, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-******************************************************************************/
-/* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */
-
-#ifndef _LBX_IMAGE_H_
-#define _LBX_IMAGE_H_
-
-#include <X11/Xfuncproto.h>
-
-_XFUNCPROTOBEGIN
-
-typedef struct _LbxBitmapCompMethod {
-
- char *methodName;
- int inited;
- int methodOpCode; /* to be filled on reply from server */
-
- int (*compInit)(
- void
- );
-
- int (*compFunc)(
- unsigned char * /* inbuf */,
- unsigned char * /* outbuf */,
- int /* outbufSize */,
- int /* image_bytes */,
- int /* pixels_per_line */,
- int /* padded_bytes_per_scanline */,
- int /* reverse_bits */,
- int * /* bytesCompressed */
- );
-
- int (*decompFunc)(
- unsigned char * /* inbuf */,
- unsigned char * /* outbuf */,
- int /* image_bytes */,
- int /* pixels_per_line */,
- int /* padded_bytes_per_scanline */,
- int /* reverse_bits */
- );
-
-} LbxBitmapCompMethod;
-
-
-#define LBX_MAX_DEPTHS 5
-
-typedef struct _LbxPixmapCompMethod {
-
- char *methodName;
- unsigned formatMask;
- int depthCount;
- int depths[LBX_MAX_DEPTHS];
- int inited;
- int methodOpCode; /* to be filled on reply from server */
-
- int (*compInit)(
- void
- );
-
- int (*compFunc)(
- char * /* inbuf */,
- char * /* outbuf */,
- int /* outbufSize */,
- int /* format */,
- int /* depth */,
- int /* num_scan_lines */,
- int /* scan_line_size */,
- int * /* bytesCompressed */
- );
-
- int (*decompFunc)(
- char * /* inbuf */,
- char * /* outbuf */,
- int /* num_scan_lines */,
- int /* scan_line_size */
- );
-
-} LbxPixmapCompMethod;
-
-
-extern int LbxImageEncodePackBits (
-char * /* inbuf */,
-char * /* outbuf */,
-int /* outbufSize */,
-int /* format */,
-int /* depth */,
-int /* num_scan_lines */,
-int /* scan_line_size */,
-int * /* bytesCompressed */
-);
-
-extern int LbxImageEncodeFaxG42D (
-unsigned char * /* inbuf */,
-unsigned char * /* outbuf */,
-int /* outbufSize */,
-int /* image_bytes */,
-int /* pixels_per_line */,
-int /* padded_bytes_per_scanline */,
-int /* reverse_bits */,
-int * /* bytesCompressed */
-);
-
-extern int LbxImageDecodePackBits (
-char * /* inbuf */,
-char * /* outbuf */,
-int /* num_scan_lines */,
-int /* scan_line_size */
-);
-
-extern int LbxImageDecodeFaxG42D (
-unsigned char * /* inbuf */,
-unsigned char * /* outbuf */,
-int /* image_bytes */,
-int /* pixels_per_line */,
-int /* padded_bytes_per_scanline */,
-int /* reverse_bits */
-);
-
-_XFUNCPROTOEND
-
-#define LBX_IMAGE_COMPRESS_SUCCESS 0
-#define LBX_IMAGE_COMPRESS_NO_SUPPORT 1
-#define LBX_IMAGE_COMPRESS_BAD_MALLOC 2
-#define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3
-
-#endif /* _LBX_IMAGE_H_ */
diff --git a/filesthatshouldbethesame.py b/filesthatshouldbethesame.py
index 76725e583..259951ac8 100644
--- a/filesthatshouldbethesame.py
+++ b/filesthatshouldbethesame.py
@@ -50,9 +50,6 @@ libXt\include\X11\Xtos.h X11\Xtos.h
libXext\include\X11\extensions\dpms.h X11\extensions\dpms.h
libXext\include\X11\extensions\extutil.h X11\extensions\extutil.h
-libXext\include\X11\extensions\lbxbuf.h X11\extensions\lbxbuf.h
-libXext\include\X11\extensions\lbxbufstr.h X11\extensions\lbxbufstr.h
-libXext\include\X11\extensions\lbximage.h X11\extensions\lbximage.h
libXext\include\X11\extensions\MITMisc.h X11\extensions\MITMisc.h
libXext\include\X11\extensions\multibuf.h X11\extensions\multibuf.h
libXext\include\X11\extensions\security.h X11\extensions\security.h
diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c
index a3658ec80..af163185a 100644
--- a/libxcb/src/xcb_util.c
+++ b/libxcb/src/xcb_util.c
@@ -68,6 +68,7 @@ static int _xcb_parse_display(const char *name, char **host, char **protocol,
{
int len, display, screen;
char *slash, *colon, *dot, *end;
+
if(!name || !*name)
name = getenv("DISPLAY");
if(!name)
@@ -96,35 +97,43 @@ static int _xcb_parse_display(const char *name, char **host, char **protocol,
colon = strrchr(name, ':');
if(!colon)
- return 0;
+ goto error_out;
len = colon - name;
++colon;
display = strtoul(colon, &dot, 10);
if(dot == colon)
- return 0;
+ goto error_out;
if(*dot == '\0')
screen = 0;
else
{
if(*dot != '.')
- return 0;
+ goto error_out;
++dot;
screen = strtoul(dot, &end, 10);
if(end == dot || *end != '\0')
- return 0;
+ goto error_out;
}
/* At this point, the display string is fully parsed and valid, but
* the caller's memory is untouched. */
*host = malloc(len + 1);
if(!*host)
- return 0;
+ goto error_out;
memcpy(*host, name, len);
(*host)[len] = '\0';
*displayp = display;
if(screenp)
*screenp = screen;
return 1;
+
+error_out:
+ if (protocol) {
+ free(*protocol);
+ *protocol = NULL;
+ }
+
+ return 0;
}
int xcb_parse_display(const char *name, char **host, int *displayp,
@@ -417,24 +426,28 @@ xcb_connection_t *xcb_connect(const char *displayname, int *screenp)
xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname, xcb_auth_info_t *auth, int *screenp)
{
int fd, display = 0;
- char *host;
- char *protocol;
+ char *host = NULL;
+ char *protocol = NULL;
xcb_auth_info_t ourauth;
xcb_connection_t *c;
int parsed = _xcb_parse_display(displayname, &host, &protocol, &display, screenp);
- if(!parsed)
- return (xcb_connection_t *) &error_connection;
- else
+ if(!parsed) {
+ c = (xcb_connection_t *) &error_connection;
+ goto out;
+ } else
fd = _xcb_open(host, protocol, display);
- free(host);
- if(fd == -1)
- return (xcb_connection_t *) &error_connection;
+ if(fd == -1) {
+ c = (xcb_connection_t *) &error_connection;
+ goto out;
+ }
- if(auth)
- return xcb_connect_to_fd(fd, auth);
+ if(auth) {
+ c = xcb_connect_to_fd(fd, auth);
+ goto out;
+ }
if(_xcb_get_auth_info(fd, &ourauth, display))
{
@@ -445,5 +458,8 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname,
else
c = xcb_connect_to_fd(fd, 0);
+out:
+ free(host);
+ free(protocol);
return c;
}
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index dec96468d..161f9cda0 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.8.99.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="unreleased"
+AC_INIT([xorg-server], 1.8.99.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2010-06-15"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index ff5af9379..4f73044bb 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -1554,7 +1554,7 @@ InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, Atom* btn_
return(InitButtonClassDeviceStruct(dev, numButtons, btn_labels, map) &&
InitValuatorClassDeviceStruct(dev, numAxes, axes_labels,
- numMotionEvents, 0) &&
+ numMotionEvents, Relative) &&
InitPtrFeedbackClassDeviceStruct(dev, controlProc));
}
diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c
index a8420c749..271d698d0 100644
--- a/xorg-server/glx/glxscreens.c
+++ b/xorg-server/glx/glxscreens.c
@@ -433,9 +433,9 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
if (i == pScreen->numVisuals)
continue;
- /* Make sure the FBconfig supports window drawables */
- if (!(config->drawableType & GLX_WINDOW_BIT))
- continue;
+ /* Make sure the FBconfig supports window drawables */
+ if (!(config->drawableType & GLX_WINDOW_BIT))
+ continue;
/* Create a new X visual for our FBconfig. */
visual = AddScreenVisuals(pScreen, 1, depth);
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index 404f4ca60..9cb228d06 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -38,6 +38,8 @@
#include "ephyrglxext.h"
#endif /* XF86DRI */
+#include "xkbsrv.h"
+
extern int KdTsPhyScreen;
#ifdef GLXEXT
extern Bool noGlxVisualInit;
@@ -751,75 +753,55 @@ ephyrScreenFini (KdScreenInfo *screen)
void
ephyrUpdateModifierState(unsigned int state)
{
-#if 0
- DeviceIntPtr pkeydev;
- KeyClassPtr keyc;
- int i;
- CARD8 mask;
-
- pkeydev = inputInfo.keyboard;
- if (!pkeydev)
- return;
+ DeviceIntPtr pDev = inputInfo.keyboard;
+ KeyClassPtr keyc = pDev->key;
+ int i;
+ CARD8 mask;
+ int xkb_state;
-/* This is pretty broken.
- *
- * What should happen is that focus out should do as a VT switch does in
- * traditional servers: fake releases for all keys (and buttons too, come
- * to think of it) currently down. Then, on focus in, get the state from
- * the host, and fake keypresses for everything currently down.
- *
- * So I'm leaving this broken for a little while. Sorry, folks.
- *
- * -daniels
- */
+ if (!pDev)
+ return;
- keyc = pkeydev->key;
-
+ xkb_state = XkbStateFieldFromRec(&pDev->key->xkbInfo->state);
state = state & 0xff;
-
- if (keyc->state == state)
+
+ if (xkb_state == state)
return;
-
- for (i = 0, mask = 1; i < 8; i++, mask <<= 1)
- {
- int key;
- /* Modifier is down, but shouldn't be */
- if ((keyc->state & mask) && !(state & mask))
- {
- int count = keyc->modifierKeyCount[i];
-
- for (key = 0; key < MAP_LENGTH; key++)
- if (keyc->xkbInfo->desc->map->modmap[key] & mask)
- {
- int bit;
- BYTE *kptr;
-
- kptr = &keyc->down[key >> 3];
- bit = 1 << (key & 7);
-
- if (*kptr & bit && ephyrKbd &&
- ((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled)
- KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE); /* release */
-
- if (--count == 0)
- break;
- }
- }
-
- /* Modifier shoud be down, but isn't */
- if (!(keyc->state & mask) && (state & mask))
- for (key = 0; key < MAP_LENGTH; key++)
- if (keyc->xkbInfo->desc->map->modmap[key] & mask)
- {
- if (keyc->xkbInfo->desc->map->modmap[key] & mask && ephyrKbd &&
- ((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled)
- KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE); /* press */
- break;
- }
+ for (i = 0, mask = 1; i < 8; i++, mask <<= 1) {
+ int key;
+
+ /* Modifier is down, but shouldn't be
+ */
+ if ((xkb_state & mask) && !(state & mask)) {
+ int count = keyc->modifierKeyCount[i];
+
+ for (key = 0; key < MAP_LENGTH; key++)
+ if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
+ int bit;
+ BYTE *kptr;
+
+ kptr = &keyc->down[key >> 3];
+ bit = 1 << (key & 7);
+
+ if (*kptr & bit)
+ KdEnqueueKeyboardEvent (ephyrKbd, key, TRUE);
+
+ if (--count == 0)
+ break;
+ }
}
-#endif
+
+ /* Modifier shoud be down, but isn't
+ */
+ if (!(xkb_state & mask) && (state & mask))
+ for (key = 0; key < MAP_LENGTH; key++)
+ if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
+ KdEnqueueKeyboardEvent (ephyrKbd, key, FALSE);
+ break;
+ }
+ }
}
static void
@@ -1009,6 +991,7 @@ ephyrPoll(void)
if (!ephyrKbd ||
!((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled)
continue;
+ ephyrUpdateModifierState(ev.key_state);
KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE);
break;
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index bb1be358b..123bc3225 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -957,8 +957,12 @@ Bool
DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd,
const char **driverName, const char **deviceName)
{
- DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
+ DRI2ScreenPtr ds;
+
+ if (!dixPrivateKeyRegistered(dri2ScreenPrivateKey))
+ return FALSE;
+ ds = DRI2GetScreen(pScreen);
if (ds == NULL || driverType >= ds->numDrivers ||
!ds->driverNames[driverType])
return FALSE;
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index 9c5b3c1ad..6a56e31cc 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -753,6 +753,8 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen)
crtc->randr_crtc = NULL;
}
+ xf86RandR12CloseScreen (screen);
+
return screen->CloseScreen (index, screen);
}
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c
index e49387317..90e267c1e 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.c
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c
@@ -928,6 +928,24 @@ xf86RandR12Init (ScreenPtr pScreen)
}
void
+xf86RandR12CloseScreen (ScreenPtr pScreen)
+{
+ XF86RandRInfoPtr randrp;
+
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
+ if (xf86RandR12Key == NULL)
+ return;
+#endif
+
+ randrp = XF86RANDRINFO(pScreen);
+#if RANDR_12_INTERFACE
+ xf86Screens[pScreen->myNum]->EnterVT = randrp->orig_EnterVT;
+#endif
+
+ free(randrp);
+}
+
+void
xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations)
{
XF86RandRInfoPtr randrp;
@@ -1755,10 +1773,16 @@ static Bool
xf86RandR12EnterVT (int screen_index, int flags)
{
ScreenPtr pScreen = screenInfo.screens[screen_index];
+ ScrnInfoPtr pScrn = xf86Screens[screen_index];
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ Bool ret;
if (randrp->orig_EnterVT) {
- if (!randrp->orig_EnterVT (screen_index, flags))
+ pScrn->EnterVT = randrp->orig_EnterVT;
+ ret = pScrn->EnterVT (screen_index, flags);
+ randrp->orig_EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = xf86RandR12EnterVT;
+ if (!ret)
return FALSE;
}
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.h b/xorg-server/hw/xfree86/modes/xf86RandR12.h
index c8d9918cf..755a472d1 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.h
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.h
@@ -1,42 +1,43 @@
-/*
- * Copyright © 2006 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting documentation, and
- * that the name of the copyright holders not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. The copyright holders make no representations
- * about the suitability of this software for any purpose. It is provided "as
- * is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- * OF THIS SOFTWARE.
- */
-
-#ifndef _XF86_RANDR_H_
-#define _XF86_RANDR_H_
-#include <randrstr.h>
-#include <X11/extensions/render.h>
-#if XF86_MODES_RENAME
-#include "xf86Rename.h"
-#endif
-
-extern _X_EXPORT Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen);
-extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen);
-extern _X_EXPORT void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation);
-extern _X_EXPORT void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms);
-extern _X_EXPORT Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate,
- RRScreenSizePtr pSize);
-extern _X_EXPORT Rotation xf86RandR12GetRotation(ScreenPtr pScreen);
-extern _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y);
-extern _X_EXPORT Bool xf86RandR12PreInit (ScrnInfoPtr pScrn);
-extern _X_EXPORT void xf86RandR12TellChanged (ScreenPtr pScreen);
-
-#endif /* _XF86_RANDR_H_ */
+/*
+ * Copyright © 2006 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no representations
+ * about the suitability of this software for any purpose. It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _XF86_RANDR_H_
+#define _XF86_RANDR_H_
+#include <randrstr.h>
+#include <X11/extensions/render.h>
+#if XF86_MODES_RENAME
+#include "xf86Rename.h"
+#endif
+
+extern _X_EXPORT Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen);
+extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen);
+extern _X_EXPORT void xf86RandR12CloseScreen(ScreenPtr pScreen);
+extern _X_EXPORT void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation);
+extern _X_EXPORT void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms);
+extern _X_EXPORT Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate,
+ RRScreenSizePtr pSize);
+extern _X_EXPORT Rotation xf86RandR12GetRotation(ScreenPtr pScreen);
+extern _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y);
+extern _X_EXPORT Bool xf86RandR12PreInit (ScrnInfoPtr pScrn);
+extern _X_EXPORT void xf86RandR12TellChanged (ScreenPtr pScreen);
+
+#endif /* _XF86_RANDR_H_ */