wayland: Add missing breaks on MetaWaylandSeat event handler

The events might fall through if there's no corresponding active
pointer/keyboard/touch interface. Barring bugs this should be safe to do,
just a bit wasteful.
This commit is contained in:
Carlos Garnacho 2018-01-17 14:00:44 +01:00
parent 7346419295
commit eac0e253e1

View File

@ -374,17 +374,20 @@ meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
if (meta_wayland_seat_has_pointer (seat)) if (meta_wayland_seat_has_pointer (seat))
return meta_wayland_pointer_handle_event (seat->pointer, event); return meta_wayland_pointer_handle_event (seat->pointer, event);
break;
case CLUTTER_KEY_PRESS: case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE: case CLUTTER_KEY_RELEASE:
if (meta_wayland_seat_has_keyboard (seat)) if (meta_wayland_seat_has_keyboard (seat))
return meta_wayland_keyboard_handle_event (seat->keyboard, return meta_wayland_keyboard_handle_event (seat->keyboard,
(const ClutterKeyEvent *) event); (const ClutterKeyEvent *) event);
break;
case CLUTTER_TOUCH_BEGIN: case CLUTTER_TOUCH_BEGIN:
case CLUTTER_TOUCH_UPDATE: case CLUTTER_TOUCH_UPDATE:
case CLUTTER_TOUCH_END: case CLUTTER_TOUCH_END:
if (meta_wayland_seat_has_touch (seat)) if (meta_wayland_seat_has_touch (seat))
return meta_wayland_touch_handle_event (seat->touch, event); return meta_wayland_touch_handle_event (seat->touch, event);
break;
default: default:
break; break;
} }