aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libX11/src/Makefile.am2
-rw-r--r--xorg-server/configure.ac3
-rw-r--r--xorg-server/dix/events.c52
-rw-r--r--xorg-server/dix/main.c3
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrdriext.c3
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c15
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c5
-rw-r--r--xorg-server/include/dixstruct.h1
-rw-r--r--xorg-server/include/xkbsrv.h3
-rw-r--r--xorg-server/os/connection.c9
-rw-r--r--xorg-server/xkb/xkbAccessX.c18
-rw-r--r--xorg-server/xkb/xkbActions.c10
-rw-r--r--xorg-server/xkb/xkbUtils.c26
13 files changed, 90 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 91966c4a8..db5aab1a9 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -3426,7 +3426,6 @@ CheckPassiveGrabsOnWindow(
{
DeviceIntPtr gdev;
XkbSrvInfoPtr xkbi = NULL;
- Mask mask = 0;
gdev= grab->modifierDevice;
if (grab->grabtype == GRABTYPE_CORE)
@@ -3541,9 +3540,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);
@@ -3555,34 +3551,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);
@@ -3593,23 +3561,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);
@@ -3618,7 +3569,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 0e3a8567a..4c81c4d1b 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -228,9 +228,10 @@ 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
+ /* Initialize server client devPrivates, to be reallocated as
* more client privates are registered
*/
if (!dixAllocatePrivates(&serverClient->devPrivates, PRIVATE_CLIENT))
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 0a25307b1..a77e56d7c 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 2648ff51a..ce29a8150 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 5cbca81bd..bec7b1b23 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -1175,6 +1175,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))
{
@@ -1209,6 +1213,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 44675c9fe..d631b3286 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;
+ }
+}