[gtk+] mir: start handling resize events again
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] mir: start handling resize events again
- Date: Mon, 13 Mar 2017 14:53:04 +0000 (UTC)
commit 05ca5835156cc8ea0d877b7db5ab55f2a08ad3f7
Author: William Hua <william hua canonical com>
Date: Mon Mar 13 10:48:43 2017 -0400
mir: start handling resize events again
gdk/mir/gdkmireventsource.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/gdk/mir/gdkmireventsource.c b/gdk/mir/gdkmireventsource.c
index fedcd70..8b239be 100644
--- a/gdk/mir/gdkmireventsource.c
+++ b/gdk/mir/gdkmireventsource.c
@@ -505,6 +505,32 @@ handle_window_event (GdkWindow *window,
}
static void
+generate_configure_event (GdkWindow *window,
+ gint width,
+ gint height)
+{
+ GdkEvent *event;
+
+ event = gdk_event_new (GDK_CONFIGURE);
+ event->configure.send_event = FALSE;
+ event->configure.width = width;
+ event->configure.height = height;
+
+ send_event (window, get_pointer (window), event);
+}
+
+static void
+handle_resize_event (GdkWindow *window,
+ const MirResizeEvent *event)
+{
+ window->width = mir_resize_event_get_width (event);
+ window->height = mir_resize_event_get_height (event);
+ _gdk_window_update_size (window);
+
+ generate_configure_event (window, mir_resize_event_get_width (event), mir_resize_event_get_height (event));
+}
+
+static void
handle_close_event (GdkWindow *window)
{
send_event (window, get_pointer (window), gdk_event_new (GDK_DESTROY));
@@ -570,6 +596,7 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
handle_window_event (window, mir_event_get_window_event (event));
break;
case mir_event_type_resize:
+ handle_resize_event (window, mir_event_get_resize_event (event));
break;
case mir_event_type_prompt_session_state_change:
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]