From d99407b2e88bcdc83e19d9ebd65f2d53ad2ed138 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 9 Aug 2023 12:24:03 +0200 Subject: [PATCH] clutter: Drop misguided assert The clutter_seat_handle_event_post() function wants to handle CLUTTER_DEVICE_ADDED/REMOVED to perform signal emission, but checks (and asserts) that every event going through it has a source device. This is no longer quite true for IM events (they are attached to the ClutterSeat's keyboard, not a HW device), so the assert can now fire off (of course undesiredly). But anyways, for events built through clutter_event_device_notification_new() (the ones this function is interested in, after all), it is already a precondition check that the device is proper at the time of creating the event, so asserting for it here is redundant. We can drop this overly generic assert, this is already ensured for the events that matter, anyways. Part-of: --- clutter/clutter/clutter-seat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/clutter/clutter/clutter-seat.c b/clutter/clutter/clutter-seat.c index 5bfe3ab9d..9dcec5475 100644 --- a/clutter/clutter/clutter-seat.c +++ b/clutter/clutter/clutter-seat.c @@ -639,7 +639,6 @@ clutter_seat_handle_event_post (ClutterSeat *seat, seat_class->handle_event_post (seat, event); device = clutter_event_get_source_device (event); - g_assert_true (CLUTTER_IS_INPUT_DEVICE (device)); switch (clutter_event_type (event)) {