xserver: Branch 'master' - 5 commits
Keith Packard
keithp at kemper.freedesktop.org
Mon Jun 29 21:01:00 PDT 2015
Xext/xace.c | 15 +++++++++++++++
Xext/xace.h | 3 +++
Xi/exevents.c | 15 ++++++++++++++-
configure.ac | 53 +++++++++++++++++++++++++++--------------------------
4 files changed, 59 insertions(+), 27 deletions(-)
New commits:
commit 84128c10bb6d34f78f7a4148b3c640748efe58e1
Merge: 9003a3e 8c86dd5
Author: Keith Packard <keithp at keithp.com>
Date: Mon Jun 29 20:59:31 2015 -0700
Merge remote-tracking branch 'whot/for-keith'
commit 8c86dd51606486f4794c503b9c05c6875bdc693a
Author: Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
Date: Tue Jun 23 08:41:57 2015 -0300
configure.ac: fix code misplacing for KDRIVE_{KBD, MOUSE, EVDEV} auto-detection
KDrive input drivers "kbd", "mouse", and "evdev" should be automatically built
for linux systems. However, due to a code misplacing in configure.ac, the
auto-detection test is being performed AFTER the corresponding AC_DEFINEs' calls,
so that the drivers are NOT being built, regardless the test result.
This bug should be affecting previous xorg-server releases. Please consider
backporting this patch to all maintained ones!
Signed-off-by: Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/configure.ac b/configure.ac
index f760730..f187a13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2337,6 +2337,33 @@ if test "$KDRIVE" = yes; then
fi
fi
+ case $host_os in
+ *linux*)
+ KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la'
+ KDRIVELINUX=yes
+ if test "x$KDRIVE_EVDEV" = xauto; then
+ KDRIVE_EVDEV=yes
+ fi
+ if test "x$KDRIVE_KBD" = xauto; then
+ KDRIVE_KBD=yes
+ fi
+ if test "x$KDRIVE_MOUSE" = xauto; then
+ KDRIVE_MOUSE=yes
+ fi
+ ;;
+ *)
+ if test "x$KDRIVE_EVDEV" = xauto; then
+ KDRIVE_EVDEV=no
+ fi
+ if test "x$KDRIVE_KBD" = xauto; then
+ KDRIVE_KBD=no
+ fi
+ if test "x$KDRIVE_MOUSE" = xauto; then
+ KDRIVE_MOUSE=no
+ fi
+ ;;
+ esac
+
if test "x$KDRIVE_KBD" = xyes; then
AC_DEFINE(KDRIVE_KBD, 1, [Enable KDrive kbd driver])
fi
@@ -2378,32 +2405,6 @@ if test "$KDRIVE" = yes; then
KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB"
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la'
- case $host_os in
- *linux*)
- KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.la'
- KDRIVELINUX=yes
- if test "x$KDRIVE_EVDEV" = xauto; then
- KDRIVE_EVDEV=yes
- fi
- if test "x$KDRIVE_KBD" = xauto; then
- KDRIVE_KBD=yes
- fi
- if test "x$KDRIVE_MOUSE" = xauto; then
- KDRIVE_MOUSE=yes
- fi
- ;;
- *)
- if test "x$KDRIVE_EVDEV" = xauto; then
- KDRIVE_EVDEV=no
- fi
- if test "x$KDRIVE_KBD" = xauto; then
- KDRIVE_KBD=no
- fi
- if test "x$KDRIVE_MOUSE" = xauto; then
- KDRIVE_MOUSE=no
- fi
- ;;
- esac
KDRIVE_MAIN_LIB="$MAIN_LIB"
KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
commit f4c3cac010cff0980905eeedd8e8d7baf0aff91b
Author: Alexander Volkov <a.volkov at rusbitech.ru>
Date: Wed Jun 17 12:41:35 2015 +0300
Xi: call UpdateDeviceState() even when the client is missing
The client window can be closed in the middle of a touch sequence,
e.g. Qt 4 closes popup windows on MousePress and Qt 5.5 will do it
on TouchBegin. In this case the state of mouse buttons will not be
updated on TouchEnd because ProcessTouchEvent() calls UpdateDeviceState()
only when the event has been sent to the client. It results in a
stuck left mouse button.
This patch leads to calling UpdateDeviceState() in case the client
can't be found.
Signed-off-by: Alexander Volkov <a.volkov at rusbitech.ru>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/Xi/exevents.c b/Xi/exevents.c
index cd33f94..e728310 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1590,7 +1590,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
if (!ti) {
DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n",
dev->name, type, touchid);
- return;
+ goto out;
}
/* if emulate_pointer is set, emulate the motion event right
@@ -1624,6 +1624,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
if (ev->any.type == ET_TouchEnd)
TouchEndTouch(dev, ti);
+ out:
if (emulate_pointer)
UpdateDeviceState(dev, &ev->device_event);
}
commit 990cf5b2828f73dc7a07f1e38f608af39acfd81d
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Thu Jun 4 13:24:53 2015 -0500
dix: Send KeyPress and KeyRelease events to the XACE_KEY_AVAIL hook
While it's documented in the XACE spec, the XACE_KEY_AVAIL hook is
currently never actually invoked by the xserver.
This hook was added in 13c6713c82 (25 Aug 2006), but as the keyboard
processing was moved into XKB, the hook was forgotten and silently
dropped. The code calling this hook was removed by 7af53799c (4 Jan
2009), but it was probably already unused before that.
This patch re-adds support for this hook. The "count" hook parameter is
unused.
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 1c586d0..cd33f94 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1730,6 +1730,18 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
break;
}
+ /* send KeyPress and KeyRelease events to XACE plugins */
+ if (XaceHookIsSet(XACE_KEY_AVAIL) &&
+ (event->type == ET_KeyPress || event->type == ET_KeyRelease)) {
+ xEvent *core;
+ int count;
+
+ if (EventToCore(ev, &core, &count) == Success && count > 0) {
+ XaceHook(XACE_KEY_AVAIL, core, device, 0);
+ free(core);
+ }
+ }
+
if (DeviceEventCallback && !syncEvents.playingEvents) {
DeviceEventInfoRec eventinfo;
SpritePtr pSprite = device->spriteInfo->sprite;
commit 5dc2a9aae46352f1f35d3ba122da04727789a15d
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Thu Jun 4 13:23:19 2015 -0500
xace: Add XaceHookIsSet helper function
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/Xext/xace.c b/Xext/xace.c
index d77b312..b3c67f6 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -213,6 +213,21 @@ XaceHook(int hook, ...)
return prv ? *prv : Success;
}
+/* XaceHookIsSet
+ *
+ * Utility function to determine whether there are any callbacks listening on a
+ * particular XACE hook.
+ *
+ * Returns non-zero if there is a callback, zero otherwise.
+ */
+int
+XaceHookIsSet(int hook)
+{
+ if (hook < 0 || hook >= XACE_NUM_HOOKS)
+ return 0;
+ return XaceHooks[hook] != NULL;
+}
+
/* XaceCensorImage
*
* Called after pScreen->GetImage to prevent pieces or trusted windows from
diff --git a/Xext/xace.h b/Xext/xace.h
index 5e6cb04..3303f76 100644
--- a/Xext/xace.h
+++ b/Xext/xace.h
@@ -65,6 +65,9 @@ extern _X_EXPORT int XaceHook(int /*hook */ ,
... /*appropriate args for hook */
);
+/* determine whether any callbacks are present for the XACE hook */
+extern _X_EXPORT int XaceHookIsSet(int hook);
+
/* Special-cased hook functions
*/
extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major);
More information about the xorg-commit
mailing list