[gtk+/gtk-3-22] mir: always emit a resize when creating windows
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] mir: always emit a resize when creating windows
- Date: Wed, 22 Mar 2017 06:54:00 +0000 (UTC)
commit ff1a78788f82dbb73e6369d05a0445c7c7f7155b
Author: William Hua <william hua canonical com>
Date: Tue Mar 21 11:25:36 2017 -0400
mir: always emit a resize when creating windows
gdk/mir/gdkmirwindowimpl.c | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index f0a7687..9f91076 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -581,6 +581,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, ¶ms);
+
+ 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);
@@ -635,7 +654,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]