[PATCH] libinput-device: Remove unnecessary function call

Pekka Paalanen ppaalanen at gmail.com
Fri Feb 26 13:33:37 UTC 2016


On Mon, 22 Feb 2016 16:14:56 -0800
Bryce Harrington <bryce at osg.samsung.com> wrote:

> On Mon, Feb 22, 2016 at 08:47:24AM -0500, Chris Michael wrote:
> > When we handle keyboard key events, we already retrieve the key state
> > at the top of this function, so there is no real need to call the same
> > libinput function again as we can just reuse the 'key_state' variable
> > that we have above.
> > 
> > Signed-off-by: Chris Michael <cpmichael at osg.samsung.com>  
> 
> Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

Pushed:
   c25f72d..7e7f793  master -> master


Thanks,
pq

> 
> > ---
> >  src/libinput-device.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/src/libinput-device.c b/src/libinput-device.c
> > index 78b0ac9..f8b614a 100644
> > --- a/src/libinput-device.c
> > +++ b/src/libinput-device.c
> > @@ -76,8 +76,7 @@ handle_keyboard_key(struct libinput_device *libinput_device,
> >  	notify_key(device->seat,
> >  		   libinput_event_keyboard_get_time(keyboard_event),
> >  		   libinput_event_keyboard_get_key(keyboard_event),
> > -		   libinput_event_keyboard_get_key_state(keyboard_event),
> > -		   STATE_UPDATE_AUTOMATIC);
> > +		   key_state, STATE_UPDATE_AUTOMATIC);
> >  }
> >  
> >  static bool
> > -- 
> > 2.7.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160226/88480f34/attachment.sig>


More information about the wayland-devel mailing list