diff options
author | marha <marha@users.sourceforge.net> | 2010-06-16 07:38:57 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-06-16 07:38:57 +0000 |
commit | 4d5476d24bec19c71aced4ac2b320d1110fb5363 (patch) | |
tree | e4539765cbf5fe27b543055192bdac0118e07382 /xorg-server | |
parent | 35eba169d63276fc4c5692c51615a509f8572545 (diff) | |
parent | 2a31e38d82566c4f93773ecf9c79f2cc9abef169 (diff) | |
download | vcxsrv-4d5476d24bec19c71aced4ac2b320d1110fb5363.tar.gz vcxsrv-4d5476d24bec19c71aced4ac2b320d1110fb5363.tar.bz2 vcxsrv-4d5476d24bec19c71aced4ac2b320d1110fb5363.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/configure.ac | 4 | ||||
-rw-r--r-- | xorg-server/dix/devices.c | 2 | ||||
-rw-r--r-- | xorg-server/glx/glxscreens.c | 6 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.c | 107 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dri2/dri2.c | 6 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86Crtc.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86RandR12.c | 26 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86RandR12.h | 85 |
8 files changed, 126 insertions, 112 deletions
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_ */
|