inspector: Avoid another crash
We need to handle all event types here. This was tripping over GDK_TOUCHPAD_HOLD events.
This commit is contained in:
@@ -1792,7 +1792,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);
|
||||
@@ -1814,6 +1814,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);
|
||||
@@ -1839,6 +1840,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:
|
||||
@@ -1853,6 +1855,7 @@ get_event_summary (GdkEvent *event)
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_EVENT_LAST:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user