discomfitor pushed a commit to branch master.

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

commit c196ef110efc2100d47de01f54adc85f334adb2c
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Apr 7 16:07:25 2017 -0400

    re-place transient wl clients when parent is first sized
    
    this should ensure more reliable centering using a nonzero geometry
---
 src/bin/e_comp_wl.c            | 11 +++++++++++
 src/bin/e_comp_wl.h            |  1 +
 src/bin/e_comp_wl_extensions.c |  1 +
 3 files changed, 13 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index f1ed45c..7046685 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1431,6 +1431,17 @@ _e_comp_wl_surface_state_commit(E_Client *ec, 
E_Comp_Wl_Surface_State *state)
           }
         w = ec->client.w;
         h = ec->client.h;
+        if (ec->comp_data->need_center)
+          {
+             Eina_List *l;
+             E_Client *cec;
+             EINA_LIST_FOREACH(ec->transients, l, cec)
+               {
+                  cec->placed = 0;
+                  if (!cec->ignored) EC_CHANGED(cec);
+               }
+             ec->comp_data->need_center = 0;
+          }
      }
    else
      w = state->bw, h = state->bh;
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index 7725521..e1b43bc 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -359,6 +359,7 @@ struct _E_Comp_Wl_Client_Data
    Eina_Bool need_xdg6_configure : 1;
    Eina_Bool maximize_anims_disabled : 1;
    Eina_Bool ssd_mouse_in : 1;
+   Eina_Bool need_center : 1;
 };
 
 struct _E_Comp_Wl_Output
diff --git a/src/bin/e_comp_wl_extensions.c b/src/bin/e_comp_wl_extensions.c
index 2dc8f4c..3e9d409 100644
--- a/src/bin/e_comp_wl_extensions.c
+++ b/src/bin/e_comp_wl_extensions.c
@@ -403,6 +403,7 @@ _e_comp_wl_zxdg_imported_v1_set_parent_of(struct wl_client 
*client EINA_UNUSED,
         evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_DEL, 
_imported_del, im);
         e_client_parent_set(ec, im->ex->ec);
         ec->parent->lock_close = 1;
+        ec->parent->comp_data->need_center = 1;
      }
 }
 

-- 


Reply via email to