ee_wayland: Replace set_config.geometry direct use with getters
authorDerek Foreman <derek.foreman.samsung@gmail.com>
Wed, 28 Nov 2018 20:19:56 +0000 (14:19 -0600)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 18 Dec 2018 04:23:55 +0000 (13:23 +0900)
I'm going to deal with some ugly geometry problems in the getter func
shortly.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7432

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index d2ded04..47e0b79 100755 (executable)
@@ -621,6 +621,7 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
    Ecore_Evas_Engine_Wl_Data *wdata;
    Ecore_Wl2_Event_Window_Configure *ev;
    int nw = 0, nh = 0, fw, fh, pfw, pfh, sw, sh, contentw, contenth;
+   int ww, wh;
    int framew, frameh;
    Eina_Bool active, prev_max, prev_full, state_change = EINA_FALSE;
 
@@ -667,13 +668,15 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
    ny = ev->y;
 //
 
+   ecore_wl2_window_geometry_get(wdata->win, NULL, NULL, &ww, &wh);
+
    sw = ee->shadow.l + ee->shadow.r;
    sh = ee->shadow.t + ee->shadow.b;
    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);
-   pfw = fw = wdata->win->set_config.geometry.w - contentw;
-   pfh = fh = wdata->win->set_config.geometry.h - contenth;
+   contentw = ww - (framew - sw);
+   contenth = wh - (frameh - sh);
+   pfw = fw = ww - contentw;
+   pfh = fh = wh - contenth;
 
    if ((prev_max != ee->prop.maximized) ||
        (prev_full != ee->prop.fullscreen) ||
@@ -684,10 +687,10 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
         sw = ee->shadow.l + ee->shadow.r;
         sh = ee->shadow.t + ee->shadow.b;
         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;
+        contentw = ww - (framew - sw);
+        contenth = wh - (frameh - sh);
+        fw = ww - contentw;
+        fh = wh - contenth;
      }
    if ((!nw) && (!nh))
      {
@@ -2562,10 +2565,11 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas, void *event EINA_
    /* Surviving bits of WWW - track interesting state we might want
     * to pass to clients to do client side effects
     */
-   einfo->window.x = wdata->win->set_config.geometry.x;
-   einfo->window.y = wdata->win->set_config.geometry.y;
-   einfo->window.w = wdata->win->set_config.geometry.w;
-   einfo->window.h = wdata->win->set_config.geometry.h;
+   ecore_wl2_window_geometry_get(wdata->win,
+                                 &einfo->window.x,
+                                 &einfo->window.y,
+                                 &einfo->window.w,
+                                 &einfo->window.h);
    if (einfo->resizing)
      {
         einfo->x_rel = 0;