On Tue, Jan 08, 2013 at 12:18:16AM +0200, Ville Syrjälä wrote: > On Sat, Aug 25, 2012 at 04:47:42PM -0500, Steven Elliott wrote: > > On Fri, 2012-08-24 at 12:29 +1000, Peter Hutterer wrote: > > > we can't drop this block, it is central to button handling with multiple > > > devices. right now, if you hold a button on the mouse and the touchpad, > > > the > > > logical button will only be released once _both_ buttons are up. this is > > > behaviour we had since 1.7 (at least), I don't really want to change it. > > > > > > A better fix is what Ville suggested, that sounds like the right thing to > > > do. > > > > The attached patch does that. It no longer removes the block of code in > > question. It moves only the > > if (!IsMaster(keybd)) > > return; > > from inside DGAHandleEvent() to inside DGAProcessKeyboardEvent() and > > DGAProcessPointerEvent() after the call to UpdateDeviceState() in those > > functions like Ville suggested. > > > > I've attached an updated patch which fixes the problem for me. This > > time I generated the patch with the latest from git with > > git-format-patch in the interest of following the patch submission > > guidelines a bit more than I did last time. > > Hmm. What happened to this patch? Looks like it never got applied to > master.
heh, good timing. I just picked this up yesterday again and started fixing it. Patches here: http://patchwork.freedesktop.org/patch/12794/ http://patchwork.freedesktop.org/patch/12795/ Bug is now filed as https://bugs.freedesktop.org/show_bug.cgi?id=59100 btw. Cheers, Peter > > > > > -- > > ------------------------------------------------------------------------ > > | Steven Elliott | http://selliott.org | [email protected] | > > ------------------------------------------------------------------------ > > > From a31fb95821d0308dd6882eb67429d39e851e29b4 Mon Sep 17 00:00:00 2001 > > From: Steven Elliott <[email protected]> > > Date: Sat, 25 Aug 2012 15:44:33 -0500 > > Subject: [PATCH] Fixes a problem where mouse buttons get stuck > > down when DGA is engaged (has a handler). > > > > --- > > hw/xfree86/common/xf86DGA.c | 10 +++++++--- > > 1 files changed, 7 insertions(+), 3 deletions(-) > > > > diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c > > index a441dee..1af8d2e 100644 > > --- a/hw/xfree86/common/xf86DGA.c > > +++ b/hw/xfree86/common/xf86DGA.c > > @@ -1033,6 +1033,9 @@ DGAProcessKeyboardEvent(ScreenPtr pScreen, DGAEvent * > > event, DeviceIntPtr keybd) > > > > UpdateDeviceState(keybd, &ev); > > > > + if (!IsMaster(keybd)) > > + return; > > + > > /* > > * Deliver the DGA event > > */ > > @@ -1074,6 +1077,7 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * > > event, DeviceIntPtr mouse) > > DeviceEvent ev = { > > .header = ET_Internal, > > .length = sizeof(ev), > > + .detail.key = event->detail, > > .type = event->subtype, > > .corestate = butc ? butc->state : 0 > > }; > > @@ -1083,6 +1087,9 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * > > event, DeviceIntPtr mouse) > > > > UpdateDeviceState(mouse, &ev); > > > > + if (!IsMaster(mouse)) > > + return; > > + > > /* > > * Deliver the DGA event > > */ > > @@ -1190,9 +1197,6 @@ DGAHandleEvent(int screen_num, InternalEvent *ev, > > DeviceIntPtr device) > > if (!pScreenPriv) > > return; > > > > - if (!IsMaster(device)) > > - return; > > - > > switch (event->subtype) { > > case KeyPress: > > case KeyRelease: > > -- > > 1.7.7.6 > > > > > _______________________________________________ > > [email protected]: X.Org development > > Archives: http://lists.x.org/archives/xorg-devel > > Info: http://lists.x.org/mailman/listinfo/xorg-devel > > > -- > Ville Syrjälä > [email protected] > http://www.sci.fi/~syrjala/ _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
