[mutter] clutter: Use event source directly for debug message
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter: Use event source directly for debug message
- Date: Mon, 15 Feb 2021 13:00:36 +0000 (UTC)
commit d5b69d9cc083c3a43912da0d06bede5c5779126f
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Feb 11 17:30:17 2021 +0100
clutter: Use event source directly for debug message
No need to assign things to a separate variable there, let's just read
event->any.source directly instead.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1729>
clutter/clutter/clutter-main.c | 32 ++++++++++----------------------
1 file changed, 10 insertions(+), 22 deletions(-)
---
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index aa297e8554..36bcd88e5c 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -1658,7 +1658,6 @@ _clutter_process_event_details (ClutterActor *stage,
case CLUTTER_TOUCHPAD_PINCH:
case CLUTTER_TOUCHPAD_SWIPE:
{
- ClutterActor *actor;
gfloat x, y;
clutter_event_get_coords (event, &x, &y);
@@ -1702,22 +1701,17 @@ _clutter_process_event_details (ClutterActor *stage,
break;
}
- actor = update_device_for_event (CLUTTER_STAGE (stage), event, TRUE);
- if (actor == NULL)
- break;
+ event->any.source =
+ update_device_for_event (CLUTTER_STAGE (stage), event, TRUE);
- event->any.source = actor;
- }
- else
- {
- /* use the source already set in the synthetic event */
- actor = event->any.source;
+ if (event->any.source == NULL)
+ break;
}
CLUTTER_NOTE (EVENT,
"Reactive event received at %.2f, %.2f - actor: %p",
x, y,
- actor);
+ event->any.source);
/* button presses and releases need a click count */
if (event->type == CLUTTER_BUTTON_PRESS ||
@@ -1771,7 +1765,6 @@ _clutter_process_event_details (ClutterActor *stage,
case CLUTTER_TOUCH_CANCEL:
case CLUTTER_TOUCH_END:
{
- ClutterActor *actor;
gfloat x, y;
clutter_event_get_coords (event, &x, &y);
@@ -1803,22 +1796,17 @@ _clutter_process_event_details (ClutterActor *stage,
break;
}
- actor = update_device_for_event (CLUTTER_STAGE (stage), event, TRUE);
- if (actor == NULL)
- break;
+ event->any.source =
+ update_device_for_event (CLUTTER_STAGE (stage), event, TRUE);
- event->any.source = actor;
- }
- else
- {
- /* use the source already set in the synthetic event */
- actor = event->any.source;
+ if (event->any.source == NULL)
+ break;
}
CLUTTER_NOTE (EVENT,
"Reactive event received at %.2f, %.2f - actor: %p",
x, y,
- actor);
+ event->any.source);
emit_touch_event (event, device);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]