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