[gtk/matthiasc/for-main: 2/2] inspector: Avoid another crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-main: 2/2] inspector: Avoid another crash
- Date: Sun, 3 Apr 2022 19:55:39 +0000 (UTC)
commit 5d979cde825fcad97214d230b69c9f6f87825b62
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 3 15:53:52 2022 -0400
inspector: Avoid another crash
We need to handle all event types here.
This was tripping over GDK_TOUCHPAD_HOLD events.
gtk/inspector/recorder.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index 48ff6105b7..a237509a80 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -1807,7 +1807,7 @@ static char *
get_event_summary (GdkEvent *event)
{
double x, y;
- int type;
+ GdkEventType type;
const char *name;
gdk_event_get_position (event, &x, &y);
@@ -1829,6 +1829,7 @@ get_event_summary (GdkEvent *event)
case GDK_TOUCH_CANCEL:
case GDK_TOUCHPAD_SWIPE:
case GDK_TOUCHPAD_PINCH:
+ case GDK_TOUCHPAD_HOLD:
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
return g_strdup_printf ("%s (%.2f %.2f)", name, x, y);
@@ -1854,6 +1855,7 @@ get_event_summary (GdkEvent *event)
case GDK_PAD_RING:
case GDK_PAD_STRIP:
case GDK_PAD_GROUP_MODE:
+ case GDK_DELETE:
return g_strdup_printf ("%s", name);
case GDK_SCROLL:
@@ -1868,6 +1870,7 @@ get_event_summary (GdkEvent *event)
}
break;
+ case GDK_EVENT_LAST:
default:
g_assert_not_reached ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]