ecore-wl2: Add flag to indicate pending configure
authorChris Michael <cp.michael@samsung.com>
Tue, 10 Jan 2017 16:27:10 +0000 (11:27 -0500)
committerChris Michael <cp.michael@samsung.com>
Tue, 10 Jan 2017 16:27:10 +0000 (11:27 -0500)
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 <cp.michael@samsung.com>
src/lib/ecore_wl2/ecore_wl2_private.h
src/lib/ecore_wl2/ecore_wl2_window.c

index 56a8c0c..49b80f8 100644 (file)
@@ -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
index a51edca..978641f 100644 (file)
@@ -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);
      }