[PATCH weston v2] Fix "Back", "Forward", and other special mouse buttons in the X11 compositor.

Bryce Harrington bryce at osg.samsung.com
Wed Feb 4 19:47:19 PST 2015


On Thu, Feb 05, 2015 at 07:32:51AM +1000, Peter Hutterer wrote:
> On Wed, Feb 04, 2015 at 01:51:57AM -0800, Dima Ryazanov wrote:
> > They're off by 4 because of the scroll buttons.
> > 
> 
> > Signed-off-by: Dima Ryazanov <dima at gmail.com>
> 
> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Thanks, applied.

   90d1ac8..3e4d4bd  master -> master

 
> Cheers,
>    Peter
> 
> > ---
> >  src/compositor-x11.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/compositor-x11.c b/src/compositor-x11.c
> > index 5863446..2792251 100644
> > --- a/src/compositor-x11.c
> > +++ b/src/compositor-x11.c
> > @@ -1017,8 +1017,8 @@ x11_compositor_deliver_button_event(struct x11_compositor *c,
> >  		update_xkb_state_from_core(c, button_event->state);
> >  
> >  	switch (button_event->detail) {
> > -	default:
> > -		button = button_event->detail + BTN_LEFT - 1;
> > +	case 1:
> > +		button = BTN_LEFT;
> >  		break;
> >  	case 2:
> >  		button = BTN_MIDDLE;
> > @@ -1056,6 +1056,9 @@ x11_compositor_deliver_button_event(struct x11_compositor *c,
> >  				    WL_POINTER_AXIS_HORIZONTAL_SCROLL,
> >  				    DEFAULT_AXIS_STEP_DISTANCE);
> >  		return;
> > +	default:
> > +		button = button_event->detail + BTN_SIDE - 8;
> > +		break;
> >  	}
> >  
> >  	notify_button(&c->core_seat,
> > -- 
> > 2.1.0
> > 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list