wayland: ignore resize from no-op surface configure events, send events always
authorMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 30 Mar 2016 19:42:21 +0000 (15:42 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 30 Mar 2016 19:42:21 +0000 (15:42 -0400)
this fixes the case where a configure event with the current window geometry
would cause (inaccurate) resizes

@fix

src/lib/ecore_wl2/ecore_wl2_window.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index dd921852c6501cfe831358222231114da046e7fa..28359c20f367ca01d7b134eec59855a7722cbc95 100644 (file)
@@ -113,9 +113,10 @@ _xdg_surface_cb_configure(void *data, struct xdg_surface *xdg_surface EINA_UNUSE
      }
 
    win->configure_serial = serial;
+   if ((win->geometry.w == w) && (win->geometry.h == h))
+     w = h = 0;
 
-   if ((w > 0) && (h > 0))
-     _ecore_wl2_window_configure_send(win, w, h, 0);
+   _ecore_wl2_window_configure_send(win, w, h, 0);
 }
 
 static void
index 40db840ec65c75cf17e55d34f677921010429af4..4a6659b70d10d7e62463e600ee4f7c1f54ec22b6 100644 (file)
@@ -187,8 +187,6 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
 
    nw = ev->w;
    nh = ev->h;
-   if (nw < 1) nw = 1;
-   if (nh < 1) nh = 1;
 
    if (prev_full != ee->prop.fullscreen)
      _ecore_evas_wl_common_border_update(ee);
@@ -197,6 +195,7 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
        (prev_full != ee->prop.fullscreen))
      _ecore_evas_wl_common_state_update(ee);
 
+   if ((!nw) && (!nh)) return ECORE_CALLBACK_RENEW;
    /* NB: We receive window configure sizes based on xdg surface
     * window geometry, so we need to subtract framespace here */
    evas_output_framespace_get(ee->evas, NULL, &fy, NULL, NULL);