From 8d8c933eb4aa70c8f45d3ab923849333b9537358 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 5 Jun 2020 18:31:55 +0200 Subject: [PATCH] clutter/main: Drop dead code branches We shouldn't get an input event that has not a device. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1403 --- clutter/clutter/clutter-main.c | 40 +++++----------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c index a8d35e3e7..05c6b9df7 100644 --- a/clutter/clutter/clutter-main.c +++ b/clutter/clutter/clutter-main.c @@ -1771,25 +1771,9 @@ _clutter_process_event_details (ClutterActor *stage, break; } - /* if the backend provides a device then we should - * already have everything we need to update it and - * get the actor underneath - */ - if (device != NULL) - { - actor = clutter_input_device_update (device, NULL, - CLUTTER_STAGE (stage), - TRUE); - } - else - { - CLUTTER_NOTE (EVENT, "No device found: picking"); - - actor = _clutter_stage_do_pick (CLUTTER_STAGE (stage), - x, y, - CLUTTER_PICK_REACTIVE); - } - + actor = clutter_input_device_update (device, NULL, + CLUTTER_STAGE (stage), + TRUE); if (actor == NULL) break; @@ -1897,21 +1881,9 @@ _clutter_process_event_details (ClutterActor *stage, break; } - if (device != NULL) - { - actor = clutter_input_device_update (device, sequence, - CLUTTER_STAGE (stage), - TRUE); - } - else - { - CLUTTER_NOTE (EVENT, "No device found: picking"); - - actor = _clutter_stage_do_pick (CLUTTER_STAGE (stage), - x, y, - CLUTTER_PICK_REACTIVE); - } - + actor = clutter_input_device_update (device, sequence, + CLUTTER_STAGE (stage), + TRUE); if (actor == NULL) break;