xserver: Branch 'master' - 4 commits
Adam Jackson
ajax at kemper.freedesktop.org
Tue Sep 29 09:23:39 PDT 2015
fb/fbpict.c | 13 +++++++++++--
hw/xwayland/xwayland-input.c | 14 +++++---------
xkb/xkbActions.c | 9 ++++++++-
3 files changed, 24 insertions(+), 12 deletions(-)
New commits:
commit 10e9116b3f709bec6d6a50446c1341441a0564e4
Author: Rui Matos <tiagomatos at gmail.com>
Date: Tue Jul 15 15:57:20 2014 +0200
xwayland-input: Always set the xkb group index on modifiers events
While we have keyboard focus, the server's xkb code is already locking
and latching modifiers appropriately while processing keyboard
events.
Since there is no guaranteed order between wl_keyboard key and
modifiers events, if we got the modifiers event with a locked or
latched modifier and then process the key press event for that
modifier we would wrongly unlock/unlatch. To prevent this, we ignore
locked and latched modifiers while any of our surfaces has keyboard
focus.
But we always need to set the xkb group index since this might be
triggered programatically by the wayland compositor at any time.
Reviewed-by: Daniel Stone <daniels at collabora.com>
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 010d28c..0515eb9 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -462,12 +462,6 @@ keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard,
xkbStateNotify sn;
CARD16 changed;
- /* We don't need any of this while we have keyboard focus since
- the regular key event processing already takes care of setting
- our internal state correctly. */
- if (xwl_seat->keyboard_focus)
- return;
-
for (dev = inputInfo.devices; dev; dev = dev->next) {
if (dev != xwl_seat->keyboard &&
dev != GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD))
@@ -476,10 +470,12 @@ keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard,
old_state = dev->key->xkbInfo->state;
new_state = &dev->key->xkbInfo->state;
+ if (!xwl_seat->keyboard_focus) {
+ new_state->locked_mods = mods_locked & XkbAllModifiersMask;
+ XkbLatchModifiers(dev, XkbAllModifiersMask,
+ mods_latched & XkbAllModifiersMask);
+ }
new_state->locked_group = group & XkbAllGroupsMask;
- new_state->locked_mods = mods_locked & XkbAllModifiersMask;
- XkbLatchModifiers(dev, XkbAllModifiersMask,
- mods_latched & XkbAllModifiersMask);
XkbComputeDerivedState(dev->key->xkbInfo);
commit f937032ee6526af3c9206a2d8c6eacdeeb490d3b
Author: Andreas Wettstein <wettstein509 at solnet.ch>
Date: Sat Feb 15 17:37:24 2014 +0100
xkb: Keyboard mouse button emulation should not suppress other keyboard events
With this change, when a key mapped to an action to emulate mouse button
presses and releases is held down, other keys pressed during that time are
still processed normally. This is a prerequisite for proper support of
ISOLock.
Signed-off-by: Andreas Wettstein <wettstein509 at solnet.ch>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 9619060..1a9878d 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -639,6 +639,7 @@ _XkbFilterPointerBtn(XkbSrvInfoPtr xkbi,
}
break;
}
+ return 0;
}
else if (filter->keycode == keycode) {
int button = filter->upAction.btn.button;
@@ -664,8 +665,9 @@ _XkbFilterPointerBtn(XkbSrvInfoPtr xkbi,
break;
}
filter->active = 0;
+ return 0;
}
- return 0;
+ return 1;
}
static int
commit 5447ac45bc090e8f3269979af4db55f619c5f278
Author: Andreas Wettstein <wettstein509 at solnet.ch>
Date: Sat Feb 15 17:36:51 2014 +0100
xkb: Suppress autorepeat for Set and Lock of Mods, Groups, and Controls
The autorepeat for these actions was not correctly implemented, as the key
repeat would be mistakenly interpreted as key releases. Rather than fixing
this, this change simply disables autorepeat for Set/Lock actions, for two
reasons:
- Autorepeating Set/Lock keys make complicate the interactions of actions.
- Autorepeating Set/Lock keys have no apparent benefit, but hurt in the real
world for layouts such as de(neo): Neo has a Level5 shift on the LSGT key,
and a Level5 lock on Level5 of the same key. This is unusable if LSGT
autorepeats. However, disabling autorepeat for key LSGT completely is not
ideal for users that have a "usual" layout besides Neo, where LSGT carries
symbols.
Signed-off-by: Andreas Wettstein <wettstein509 at solnet.ch>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 9dd1cbd..9619060 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -181,6 +181,7 @@ _XkbFilterSetState(XkbSrvInfoPtr xkbi,
XkbFilterPtr filter, unsigned keycode, XkbAction *pAction)
{
if (filter->keycode == 0) { /* initial press */
+ AccessXCancelRepeatKey(xkbi, keycode);
filter->keycode = keycode;
filter->active = 1;
filter->filterOthers = ((pAction->mods.mask & XkbSA_ClearLocks) != 0);
@@ -354,6 +355,9 @@ static int
_XkbFilterLockState(XkbSrvInfoPtr xkbi,
XkbFilterPtr filter, unsigned keycode, XkbAction *pAction)
{
+ if (filter->keycode == 0) /* initial press */
+ AccessXCancelRepeatKey(xkbi, keycode);
+
if (pAction && (pAction->type == XkbSA_LockGroup)) {
if (pAction->group.flags & XkbSA_GroupAbsolute)
xkbi->state.locked_group = XkbSAGroup(&pAction->group);
@@ -678,6 +682,7 @@ _XkbFilterControls(XkbSrvInfoPtr xkbi,
ctrls = xkbi->desc->ctrls;
old = *ctrls;
if (filter->keycode == 0) { /* initial press */
+ AccessXCancelRepeatKey(xkbi, keycode);
filter->keycode = keycode;
filter->active = 1;
filter->filterOthers = 0;
commit fbac451724f7e1b8ce6b6e0505cc33ccd41c5158
Author: Arcady Goldmints-Orlov <arcadyg at nvidia.com>
Date: Thu Oct 4 14:22:13 2012 -0700
Fix alphamap interactions with wfb
Set a destructor function on pixman images and call fbFinishAccess()
from there, rather than directly from free_pixman_pict(). This ensures
that fbFinishAccess() gets called even if pixman still has a reference
to the image after free_pixman_pict(), as is the case for alphamaps.
[ajax: Squash an unused variable warning in the non-wfb build]
Reviewed-by: Aaron Plattner <aplattner at nvidia.com>
Signed-off-by: Arcady Goldmints-Orlov <arcadyg at nvidia.com>
Reviewed-by: Søren Sandmann <ssp at redhat.com>
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 021f178..7ea0b66 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -345,6 +345,11 @@ static pixman_image_t *image_from_pict_internal(PicturePtr pict, Bool has_clip,
int *xoff, int *yoff,
Bool is_alpha_map);
+static void image_destroy(pixman_image_t *image, void *data)
+{
+ fbFinishAccess((DrawablePtr)data);
+}
+
static void
set_image_properties(pixman_image_t * image, PicturePtr pict, Bool has_clip,
int *xoff, int *yoff, Bool is_alpha_map)
@@ -429,6 +434,10 @@ set_image_properties(pixman_image_t * image, PicturePtr pict, Bool has_clip,
break;
}
+ if (pict->pDrawable)
+ pixman_image_set_destroy_function(image, &image_destroy,
+ pict->pDrawable);
+
pixman_image_set_filter(image, filter,
(pixman_fixed_t *) pict->filter_params,
pict->filter_nparams);
@@ -481,8 +490,8 @@ image_from_pict(PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
void
free_pixman_pict(PicturePtr pict, pixman_image_t * image)
{
- if (image && pixman_image_unref(image) && pict->pDrawable)
- fbFinishAccess(pict->pDrawable);
+ if (image)
+ pixman_image_unref(image);
}
Bool
More information about the xorg-commit
mailing list