Commit bc4df6d4 authored by Andreas Pokorny's avatar Andreas Pokorny Committed by William Hua

Fix gcc warning on potentially uninitialized gdk_event.

parent 252ccb84
...@@ -325,18 +325,13 @@ handle_touch_event (GdkWindow *window, ...@@ -325,18 +325,13 @@ handle_touch_event (GdkWindow *window,
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
{ {
switch (mir_touch_event_action (mir_touch_event, i)) MirTouchAction action = mir_touch_event_action (mir_touch_event, i);
{ if (action == mir_touch_action_up)
case mir_touch_action_up: gdk_event = gdk_event_new (GDK_TOUCH_END);
gdk_event = gdk_event_new (GDK_TOUCH_END); else if (action == mir_touch_action_down)
break; gdk_event = gdk_event_new (GDK_TOUCH_BEGIN);
case mir_touch_action_down: else
gdk_event = gdk_event_new (GDK_TOUCH_BEGIN); gdk_event = gdk_event_new (GDK_TOUCH_UPDATE);
break;
case mir_touch_action_change:
gdk_event = gdk_event_new (GDK_TOUCH_UPDATE);
break;
}
gdk_event->touch.window = window; gdk_event->touch.window = window;
gdk_event->touch.sequence = GINT_TO_POINTER (mir_touch_event_id (mir_touch_event, i)); gdk_event->touch.sequence = GINT_TO_POINTER (mir_touch_event_id (mir_touch_event, i));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment