wayland: make deliver_key_event return void

Desktop / GNOME / GTK - Ray Strode [redhat.com] - 2 March 2016 12:07 UTC

deliver_key_event is sometimes called from a timeout handler and sometimes called directly. We currently erroneously return TRUE (G_SOURCE_CONTINUE) in the case where it's called directly, but to no ill effect, since we ignore that return value. In the future, we're going to need to call it directly in other parts of the code where the return value would be relevant and handling TRUE, would require adding redundant code.

Instead, this commit just changes the code to always reset the timer manually, and never rely on glib's ability to automatically reset the timer by returning TRUE. This makes the code smaller, too, since there's less special casing required.

https://bugzilla.gnome.org/show_bug.cgi?id=757942

619799b wayland: make deliver_key_event return void
gdk/wayland/gdkdevice-wayland.c | 45 ++++++++++++++++-----------------------
1 file changed, 18 insertions(+), 27 deletions(-)

Upstream: git.gnome.org


  • Share