Hi, On Wed, May 20, 2009 at 02:46:17PM +0200, Matthias Hopf wrote: > I'm on vacation next week, and will commit this patch afterwards if > nobody objects.
Please don't: I don't think it's correct. > From 0f64eab6c2a99d686602d88f33624e3b512843d1 Mon Sep 17 00:00:00 2001 > From: Matthias Hopf <[email protected]> > Date: Wed, 20 May 2009 12:41:05 +0200 > Subject: [PATCH] xkb: Don't press+release keys on key events. > > Fixes submission of F7 to apps on switch from console for drivers that switch > fast enough (Novell bug #141443 from Januar 2006). > --- > xkb/xkbPrKeyEv.c | 5 ----- > 1 files changed, 0 insertions(+), 5 deletions(-) > > diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c > index effb0ea..a44fcbc 100644 > --- a/xkb/xkbPrKeyEv.c > +++ b/xkb/xkbPrKeyEv.c > @@ -85,11 +85,6 @@ unsigned ndx; > } > else if (event->type == ET_KeyRelease && > (!(keyc->down[key>>3]&(1<<(key&7))))) { > - XkbLastRepeatEvent= (pointer)event; > - event->type = ET_KeyPress; > - XkbHandleActions(keybd, keybd, event); > - event->type = ET_KeyRelease; > - XkbHandleActions(keybd, keybd, event); > XkbLastRepeatEvent= NULL; > return; > } If this is a key release event for a key which is already released, then send a KeyPress followed by a KeyRelease. This mirrors the behaviour for KeyPress, where a press event for a key which is already pressed sends a KeyRelease followed by a KeyPress. We shouldn't be generating releases for keys which are up, anyway. How are you getting those? As Peter said anyway, driver-triggered key repeating is deprecated, and the XKB autorepeat mechanism should be used. I'm not really happy with the way actions work at the moment, so if you want to file a bug and assign it to me and Cc Peter, I'll hopefully get it sorted for 1.7. Cheers, Daniel
signature.asc
Description: Digital signature
_______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
