libinput-device: Remove unnecessary function call
authorChristopher Michael <cpmichael@osg.samsung.com>
Fri, 19 Feb 2016 16:07:00 +0000 (11:07 -0500)
committerBryce Harrington <bryce@osg.samsung.com>
Sat, 20 Feb 2016 02:30:40 +0000 (18:30 -0800)
When we handle pointer button events, we already retrieve the button
state at the top of this function, so there is no real need to call
the same function again as we can just reuse the 'button_state'
variable that we have above.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
src/libinput-device.c

index 99b2916f136e8a06c92d562325fffacd8427493b..78b0ac922a4e0eb696eabbdbcb9600d0851a99e6 100644 (file)
@@ -154,7 +154,8 @@ handle_pointer_button(struct libinput_device *libinput_device,
        notify_button(device->seat,
                      libinput_event_pointer_get_time(pointer_event),
                      libinput_event_pointer_get_button(pointer_event),
-                     libinput_event_pointer_get_button_state(pointer_event));
+                      button_state);
+
        return true;
 }