summaryrefslogtreecommitdiff
path: root/gdk/mir
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2017-03-21 11:25:36 -0400
committerWilliam Hua <william.hua@canonical.com>2017-03-22 02:21:43 -0400
commite69b4dc3da4bf13c106858cf943eb793082f6186 (patch)
tree9b31ddc7ad97c0feb04fcdc8bbe48fa75d1f7d03 /gdk/mir
parent87689b12fc00aa8884bad3c53417fc090b39d06a (diff)
downloadgtk+-e69b4dc3da4bf13c106858cf943eb793082f6186.tar.gz
mir: always emit a resize when creating windows
Diffstat (limited to 'gdk/mir')
-rw-r--r--gdk/mir/gdkmirwindowimpl.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index 0a4008c891..50406d7877 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -572,6 +572,25 @@ generate_configure_event (GdkWindow *window,
}
static void
+synthesize_resize (GdkWindow *window)
+{
+ GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
+ MirWindowParameters params;
+
+ if (!impl->mir_window)
+ return;
+
+ mir_window_get_parameters (impl->mir_window, &params);
+
+ window->width = params.width;
+ window->height = params.height;
+
+ _gdk_window_update_size (window);
+
+ generate_configure_event (window, window->width, window->height);
+}
+
+static void
maybe_synthesize_resize (GdkWindow *window)
{
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
@@ -626,7 +645,7 @@ ensure_mir_window_full (GdkWindow *window,
impl->pending_spec_update = FALSE;
impl->buffer_stream = mir_window_get_buffer_stream (impl->mir_window);
- maybe_synthesize_resize (window);
+ synthesize_resize (window);
/* FIXME: Ignore some events until shown */
mir_window_set_event_handler (impl->mir_window, event_cb, window_ref);