Commit 9abf9906 authored by Marco Trevisan (Treviño)'s avatar Marco Trevisan (Treviño) Committed by William Hua

mir: handle new MirCloseSurfaceEvent

parent 5ac5f6f8
......@@ -269,6 +269,13 @@ _gdk_mir_print_resize_event (const MirResizeEvent *event)
g_printerr (" Size (%i, %i)\n", event->width, event->height);
}
void
_gdk_mir_print_close_event (const MirCloseSurfaceEvent *event)
{
g_printerr ("CLOSED\n");
g_printerr (" Surface %i\n", event->surface_id);
}
void
_gdk_mir_print_event (const MirEvent *event)
{
......@@ -286,6 +293,9 @@ _gdk_mir_print_event (const MirEvent *event)
case mir_event_type_resize:
_gdk_mir_print_resize_event (&event->resize);
break;
case mir_event_type_close_surface:
_gdk_mir_print_close_event (&event->close_surface);
break;
default:
g_printerr ("EVENT %u\n", event->type);
break;
......
......@@ -391,6 +391,14 @@ handle_resize_event (GdkWindow *window,
generate_configure_event (window, event->width, event->height);
}
static void
handle_close_event (GdkWindow *window,
const MirCloseSurfaceEvent *event)
{
send_event (window, get_pointer (window), gdk_event_new (GDK_DESTROY));
gdk_window_destroy_notify (window);
}
typedef struct
{
GdkWindow *window;
......@@ -423,6 +431,9 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
case mir_event_type_orientation:
// FIXME?
break;
case mir_event_type_close_surface:
handle_close_event (window, &event->close_surface);
break;
default:
g_warning ("Ignoring unknown Mir event %d", event->type);
// FIXME?
......
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