discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c45348770cf37c9cecd0459d115d9b019bf1ad3e

commit c45348770cf37c9cecd0459d115d9b019bf1ad3e
Author: Derek Foreman <[email protected]>
Date:   Wed Aug 8 14:58:44 2018 -0400

    Revert "ee_wayland: Remove pointless ack_configure"
    
    Summary:
    This reverts commit a61f254f19df163c860235e6c19e0d65ce9eb0c4.
    and a follow up commit that removed some warnings
    
    Apparently this is instrumental in enlightenment's window maximize
    animation processing.
    
    The removed bits would force an ack configure when an inbound
    configure didn't result in a change that would cause a re-render.
    Since this calculation needs knowledge of state ecore_wl2 doesn't
    track, it does need to happen here.
    
    ref T7243
    
    Reviewers: zmike
    
    Reviewed By: zmike
    
    Subscribers: cedric, #reviewers, #committers, zmike
    
    Tags: #efl
    
    Maniphest Tasks: T7243
    
    Differential Revision: https://phab.enlightenment.org/D6783
---
 .../engines/wayland/ecore_evas_wayland_common.c    | 25 +++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 8fdd6d9846..6aa098e37f 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -566,9 +566,9 @@ _ecore_evas_wl_common_cb_window_configure(void *data 
EINA_UNUSED, int type EINA_
    Ecore_Evas *ee;
    Ecore_Evas_Engine_Wl_Data *wdata;
    Ecore_Wl2_Event_Window_Configure *ev;
-   int nw = 0, nh = 0, fw, fh, sw, sh, contentw, contenth;
+   int nw = 0, nh = 0, fw, fh, pfw, pfh, sw, sh, contentw, contenth;
    int framew, frameh;
-   Eina_Bool active, prev_max, prev_full;
+   Eina_Bool active, prev_max, prev_full, state_change = EINA_FALSE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -605,13 +605,14 @@ _ecore_evas_wl_common_cb_window_configure(void *data 
EINA_UNUSED, int type EINA_
    evas_output_framespace_get(ee->evas, NULL, NULL, &framew, &frameh);
    contentw = wdata->win->set_config.geometry.w - (framew - sw);
    contenth = wdata->win->set_config.geometry.h - (frameh - sh);
-   fw = wdata->win->set_config.geometry.w - contentw;
-   fh = wdata->win->set_config.geometry.h - contenth;
+   pfw = fw = wdata->win->set_config.geometry.w - contentw;
+   pfh = fh = wdata->win->set_config.geometry.h - contenth;
 
    if ((prev_max != ee->prop.maximized) ||
        (prev_full != ee->prop.fullscreen) ||
        (active != wdata->activated))
      {
+        state_change = EINA_TRUE;
         _ecore_evas_wl_common_state_update(ee);
         sw = ee->shadow.l + ee->shadow.r;
         sh = ee->shadow.t + ee->shadow.b;
@@ -622,7 +623,21 @@ _ecore_evas_wl_common_cb_window_configure(void *data 
EINA_UNUSED, int type EINA_
         fh = wdata->win->set_config.geometry.h - contenth;
      }
    if ((!nw) && (!nh))
-     return ECORE_CALLBACK_RENEW;
+     {
+        if ((wdata->win->set_config.serial != wdata->win->req_config.serial) &&
+            wdata->win->req_config.serial && wdata->win->surface &&
+            ((!state_change) || ((pfw == fw) && (pfh == fh))))
+          {
+             if (wdata->win->xdg_configure_ack)
+               wdata->win->xdg_configure_ack(wdata->win->xdg_surface,
+                                              wdata->win->req_config.serial);
+             if (wdata->win->zxdg_configure_ack)
+               wdata->win->zxdg_configure_ack(wdata->win->zxdg_surface,
+                                              wdata->win->req_config.serial);
+             wdata->win->set_config.serial = wdata->win->req_config.serial;
+          }
+        return ECORE_CALLBACK_RENEW;
+     }
 
    if (!ee->prop.borderless)
      {

-- 


Reply via email to