From 101c772412889c1be61a785999f7af4e48171753 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 10 Jan 2017 11:27:10 -0500 Subject: [PATCH] ecore-wl2: Add flag to indicate pending configure With the change to xdg_shell v6 we need to indicate that a window has a pending configure event, and not show the window if a configure is pending. In order to handle this, we add a flag to the window structure and can check it inside ecore_evas. Signed-off-by: Chris Michael --- src/lib/ecore_wl2/ecore_wl2_private.h | 5 +++++ src/lib/ecore_wl2/ecore_wl2_window.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 56a8c0c..49b80f8 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -186,6 +186,11 @@ struct _Ecore_Wl2_Window Eina_Bool input_set : 1; Eina_Bool opaque_set : 1; + + struct + { + Eina_Bool configure : 1; + } pending; }; struct _Ecore_Wl2_Output diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index a51edca..978641f 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -187,9 +187,14 @@ static const struct xdg_surface_listener _xdg_surface_listener = }; static void -_zxdg_surface_cb_configure(void *data EINA_UNUSED, struct zxdg_surface_v6 *zxdg_surface, uint32_t serial) +_zxdg_surface_cb_configure(void *data, struct zxdg_surface_v6 *zxdg_surface EINA_UNUSED, uint32_t serial EINA_UNUSED) { + Ecore_Wl2_Window *window; + zxdg_surface_v6_ack_configure(zxdg_surface, serial); + + window = data; + window->pending.configure = EINA_FALSE; } static const struct zxdg_surface_v6_listener _zxdg_surface_listener = @@ -487,6 +492,8 @@ _ecore_wl2_window_shell_surface_init(Ecore_Wl2_Window *window) window->zxdg_configure_ack = zxdg_surface_v6_ack_configure; _ecore_wl2_window_type_set(window); + window->pending.configure = EINA_TRUE; + /* TODO: surface commit needed ? */ wl_surface_commit(window->surface); } -- 2.7.4