diff options
author | marha <marha@users.sourceforge.net> | 2010-07-01 06:37:06 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-07-01 06:37:06 +0000 |
commit | 87559ccfc67a98a75fa8068066871c35caa88e30 (patch) | |
tree | 2bf313d2ae1adb6840cff8e62ccce5f984af142a | |
parent | 644d0b3793014483679c9ae0d45a972484c10cb9 (diff) | |
download | vcxsrv-87559ccfc67a98a75fa8068066871c35caa88e30.tar.gz vcxsrv-87559ccfc67a98a75fa8068066871c35caa88e30.tar.bz2 vcxsrv-87559ccfc67a98a75fa8068066871c35caa88e30.zip |
git update 1/7/2010
-rw-r--r-- | libX11/src/Makefile.am | 2 | ||||
-rw-r--r-- | xorg-server/configure.ac | 3 | ||||
-rw-r--r-- | xorg-server/dix/events.c | 52 | ||||
-rw-r--r-- | xorg-server/dix/main.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrdriext.c | 3 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c | 15 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86Crtc.c | 5 | ||||
-rw-r--r-- | xorg-server/include/dixstruct.h | 1 | ||||
-rw-r--r-- | xorg-server/include/xkbsrv.h | 3 | ||||
-rw-r--r-- | xorg-server/os/connection.c | 9 | ||||
-rw-r--r-- | xorg-server/xkb/xkbAccessX.c | 18 | ||||
-rw-r--r-- | xorg-server/xkb/xkbActions.c | 10 | ||||
-rw-r--r-- | xorg-server/xkb/xkbUtils.c | 26 |
13 files changed, 91 insertions, 60 deletions
diff --git a/libX11/src/Makefile.am b/libX11/src/Makefile.am index d3ab2ecb3..3864bfaaa 100644 --- a/libX11/src/Makefile.am +++ b/libX11/src/Makefile.am @@ -350,7 +350,7 @@ EXTRA_DIST = \ UIThrStubs.c
libX11_xcb_la_SOURCES = x11_xcb.c Xxcbint.h
-libX11_xcb_la_LDFLAGS = -version-info 1:0:0 -no-undefined
+libX11_xcb_la_LDFLAGS = -version-number 1:0:0 -no-undefined
libX11_xcb_la_LIBADD = libX11.la
#
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac index 21ad15e4c..0fcb2264a 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -2073,6 +2073,9 @@ if test "$KDRIVE" = yes; then if test "x$XEPHYR" = xauto; then
XEPHYR=$xephyr
fi
+ if test "x$XEPHYR" = xyes && test "x$xephyr" = xno; then
+ AC_MSG_ERROR([Xephyr dependencies missing])
+ fi
# Xephyr needs nanosleep() which is in librt on Solaris
AC_CHECK_FUNC([nanosleep], [],
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index dfe951ea7..13c91f68a 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -3420,7 +3420,6 @@ CheckPassiveGrabsOnWindow( {
DeviceIntPtr gdev;
XkbSrvInfoPtr xkbi = NULL;
- Mask mask = 0;
gdev= grab->modifierDevice;
if (grab->grabtype == GRABTYPE_CORE)
@@ -3535,9 +3534,6 @@ CheckPassiveGrabsOnWindow( }
xE = &core;
count = 1;
- mask = grab->eventMask;
- if (grab->ownerEvents)
- mask |= pWin->eventMask;
} else if (match & XI2_MATCH)
{
rc = EventToXI2((InternalEvent*)event, &xE);
@@ -3549,34 +3545,6 @@ CheckPassiveGrabsOnWindow( continue;
}
count = 1;
-
- /* FIXME: EventToXI2 returns NULL for enter events, so
- * dereferencing the event is bad. Internal event types are
- * aligned with core events, so the else clause is valid.
- * long-term we should use internal events for enter/focus
- * as well */
- if (xE)
- mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
- else if (event->type == XI_Enter || event->type == XI_FocusIn)
- mask = grab->xi2mask[device->id][event->type/8];
-
- if (grab->ownerEvents && wOtherInputMasks(grab->window))
- {
- InputClientsPtr icp =
- wOtherInputMasks(grab->window)->inputClients;
-
- while(icp)
- {
- if (rClient(icp) == rClient(grab))
- {
- int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
- mask |= icp->xi2mask[device->id][evtype/8];
- break;
- }
-
- icp = icp->next;
- }
- }
} else
{
rc = EventToXI((InternalEvent*)event, &xE, &count);
@@ -3587,23 +3555,6 @@ CheckPassiveGrabsOnWindow( "(%d, %d).\n", device->name, event->type, rc);
continue;
}
- mask = grab->eventMask;
- if (grab->ownerEvents && wOtherInputMasks(grab->window))
- {
- InputClientsPtr icp =
- wOtherInputMasks(grab->window)->inputClients;
-
- while(icp)
- {
- if (rClient(icp) == rClient(grab))
- {
- mask |= icp->mask[device->id];
- break;
- }
-
- icp = icp->next;
- }
- }
}
(*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
@@ -3612,7 +3563,8 @@ CheckPassiveGrabsOnWindow( {
FixUpEventFromWindow(device, xE, grab->window, None, TRUE);
- TryClientEvents(rClient(grab), device, xE, count, mask,
+ TryClientEvents(rClient(grab), device, xE, count,
+ GetEventFilter(device, xE),
GetEventFilter(device, xE), grab);
}
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c index 69f11938b..4c2e96850 100644 --- a/xorg-server/dix/main.c +++ b/xorg-server/dix/main.c @@ -184,6 +184,9 @@ int main(int argc, char *argv[], char *envp[]) clients[0] = serverClient;
currentMaxClients = 1;
+ /* Initialize privates before first allocation */
+ dixResetPrivates();
+
/* Initialize server client devPrivates, to be reallocated as
* more client privates are registered
*/
@@ -200,7 +203,6 @@ int main(int argc, char *argv[], char *envp[]) InitEvents();
InitSelections();
InitGlyphCaching();
- dixResetPrivates();
dixResetRegistry();
ResetFontPrivateIndex();
InitCallbackManager();
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c index af411848f..d730e7fd2 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c @@ -682,7 +682,7 @@ ProcXF86DRIOpenConnection (register ClientPtr client) {
xXF86DRIOpenConnectionReply rep;
drm_handle_t hSAREA;
- char* busIdString;
+ char* busIdString = NULL;
REQUEST(xXF86DRIOpenConnectionReq);
REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq);
@@ -716,6 +716,7 @@ ProcXF86DRIOpenConnection (register ClientPtr client) WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *)&rep);
if (rep.busIdStringLength)
WriteToClient(client, rep.busIdStringLength, busIdString);
+ free(busIdString);
EPHYR_LOG ("leave\n") ;
return Success;
}
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c b/xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c index 2b81c276c..94feb7826 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c @@ -380,7 +380,8 @@ ephyrHostXVAdaptorHasPutVideo (const EphyrHostXVAdaptor *a_this, {
EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
- if (((XvAdaptorInfo*)a_this)->type & XvVideoMask & XvInputMask)
+ if ((((XvAdaptorInfo*)a_this)->type & (XvVideoMask | XvInputMask)) ==
+ (XvVideoMask | XvInputMask))
*a_result = TRUE ;
else
*a_result = FALSE ;
@@ -391,7 +392,8 @@ Bool ephyrHostXVAdaptorHasGetVideo (const EphyrHostXVAdaptor *a_this,
Bool *a_result)
{
- if (((XvAdaptorInfo*)a_this)->type & XvVideoMask & XvOutputMask)
+ if ((((XvAdaptorInfo*)a_this)->type & (XvVideoMask | XvOutputMask)) ==
+ (XvVideoMask | XvOutputMask))
*a_result = TRUE ;
else
*a_result = FALSE ;
@@ -404,7 +406,8 @@ ephyrHostXVAdaptorHasPutStill (const EphyrHostXVAdaptor *a_this, {
EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
- if (((XvAdaptorInfo*)a_this)->type & XvStillMask && XvInputMask)
+ if ((((XvAdaptorInfo*)a_this)->type & (XvStillMask | XvInputMask)) ==
+ (XvStillMask | XvInputMask))
*a_result = TRUE ;
else
*a_result = FALSE ;
@@ -417,7 +420,8 @@ ephyrHostXVAdaptorHasGetStill (const EphyrHostXVAdaptor *a_this, {
EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
- if (((XvAdaptorInfo*)a_this)->type & XvStillMask && XvOutputMask)
+ if ((((XvAdaptorInfo*)a_this)->type & (XvStillMask | XvOutputMask)) ==
+ (XvStillMask | XvOutputMask))
*a_result = TRUE ;
else
*a_result = FALSE ;
@@ -430,7 +434,8 @@ ephyrHostXVAdaptorHasPutImage (const EphyrHostXVAdaptor *a_this, {
EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ;
- if (((XvAdaptorInfo*)a_this)->type & XvImageMask && XvInputMask)
+ if ((((XvAdaptorInfo*)a_this)->type & (XvImageMask | XvInputMask)) ==
+ (XvImageMask | XvInputMask))
*a_result = TRUE ;
else
*a_result = FALSE ;
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index 6a56e31cc..beb9be66e 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -572,8 +572,11 @@ xf86OutputInitialRotation (xf86OutputPtr output) OPTION_ROTATE);
int i;
- if (!rotate_name)
+ if (!rotate_name) {
+ if (output->initial_rotation)
+ return output->initial_rotation;
return RR_Rotate_0;
+ }
for (i = 0; i < 4; i++)
if (xf86nameCompare (direction[i], rotate_name) == 0)
diff --git a/xorg-server/include/dixstruct.h b/xorg-server/include/dixstruct.h index 8f365f6ed..c0a834f23 100644 --- a/xorg-server/include/dixstruct.h +++ b/xorg-server/include/dixstruct.h @@ -98,6 +98,7 @@ typedef struct _Client { int clientGone;
int noClientException; /* this client died or needs to be
* killed */
+ int ignoreCount; /* count for Attend/IgnoreClient */
SaveSetElt *saveSet;
int numSaved;
int (**requestVector) (
diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h index 30b4f9f8e..bd342a351 100644 --- a/xorg-server/include/xkbsrv.h +++ b/xorg-server/include/xkbsrv.h @@ -924,6 +924,9 @@ extern int XkbGetEffectiveGroup( XkbStatePtr /* xkbstate */,
CARD8 /* keycode */);
+extern void XkbMergeLockedPtrBtns(
+ DeviceIntPtr /* master */);
+
#include "xkbfile.h"
#include "xkbrules.h"
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c index 648164ef3..eb171612b 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -1147,6 +1147,10 @@ IgnoreClient (ClientPtr client) OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
+ client->ignoreCount++;
+ if (client->ignoreCount > 1)
+ return;
+
isItTimeToYield = TRUE;
if (!GrabInProgress || FD_ISSET(connection, &AllClients))
{
@@ -1181,6 +1185,11 @@ AttendClient (ClientPtr client) {
OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
+
+ client->ignoreCount--;
+ if (client->ignoreCount)
+ return;
+
if (!GrabInProgress || GrabInProgress == client->index ||
FD_ISSET(connection, &GrabImperviousClients))
{
diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c index be12e5d83..22178b862 100644 --- a/xorg-server/xkb/xkbAccessX.c +++ b/xorg-server/xkb/xkbAccessX.c @@ -707,8 +707,24 @@ DeviceEvent *event = &ev->device_event; changed |= XkbPointerButtonMask;
}
else if (event->type == ET_ButtonRelease) {
- if (xkbi)
+ if (xkbi) {
xkbi->lockedPtrButtons&= ~(1 << (event->detail.key & 0x7));
+
+ /* Merge this MD's lockedPtrButtons with the one of all
+ * attached slave devices.
+ * The DIX uses a merged button state for MDs, not
+ * releasing buttons until the last SD has released
+ * thenm. If we unconditionally clear the
+ * lockedPtrButtons bit on the MD, a PointerKeys button
+ * release on the SD keyboard won't generate the required fake button
+ * event on the XTEST pointer, thus never processing the
+ * button event in the DIX and the XTEST pointer's
+ * buttons stay down - result is a stuck button.
+ */
+ if (IsMaster(dev))
+ XkbMergeLockedPtrBtns(dev);
+ }
+
changed |= XkbPointerButtonMask;
}
diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c index 48eeeb772..1274f4871 100644 --- a/xorg-server/xkb/xkbActions.c +++ b/xorg-server/xkb/xkbActions.c @@ -633,6 +633,16 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi, break;
}
xkbi->lockedPtrButtons&= ~(1<<button);
+
+ if (IsMaster(xkbi->device))
+ {
+ XkbMergeLockedPtrBtns(xkbi->device);
+ /* One SD still has lock set, don't post event */
+ if ((xkbi->lockedPtrButtons & (1 << button)) != 0)
+ break;
+ }
+
+ /* fallthrough */
case XkbSA_PtrBtn:
XkbFakeDeviceButton(xkbi->device, 0, button);
break;
diff --git a/xorg-server/xkb/xkbUtils.c b/xorg-server/xkb/xkbUtils.c index b0e643e62..9db94773f 100644 --- a/xorg-server/xkb/xkbUtils.c +++ b/xorg-server/xkb/xkbUtils.c @@ -2094,3 +2094,29 @@ XkbGetEffectiveGroup(XkbSrvInfoPtr xkbi, XkbStatePtr xkbState, CARD8 keycode) return effectiveGroup;
}
+
+/* Merge the lockedPtrButtons from all attached SDs for the given master
+ * device into the MD's state.
+ */
+void
+XkbMergeLockedPtrBtns(DeviceIntPtr master)
+{
+ DeviceIntPtr d = inputInfo.devices;
+ XkbSrvInfoPtr xkbi = NULL;
+
+ if (!IsMaster(master))
+ return;
+
+ if (!master->key)
+ return;
+
+ xkbi = master->key->xkbInfo;
+ xkbi->lockedPtrButtons = 0;
+
+ for (; d; d = d->next) {
+ if (IsMaster(d) || GetMaster(d, MASTER_KEYBOARD) != master || !d->key)
+ continue;
+
+ xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons;
+ }
+}
|