mir: handle new MirCloseSurfaceEvent

This commit is contained in:
Marco Trevisan (Treviño)
2014-12-05 15:53:03 +01:00
committed by William Hua
parent 5ac5f6f81a
commit 9abf990656
2 changed files with 21 additions and 0 deletions

View File

@ -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?