efl_ui_win: Don't allow the frame object to change size before first draw
authorDerek Foreman <derek.foreman.samsung@gmail.com>
Fri, 7 Dec 2018 16:46:11 +0000 (10:46 -0600)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 18 Dec 2018 04:23:55 +0000 (13:23 +0900)
This fixes a bug where calling:

evas_object_show(win);
evas_object_resize(win, 400, 400);
elm_run();

Would show a much smaller than 400,400 window on wayland, as the CSD
calcs would set the size smaller.

It also fixes some differences in startup size between X and wayland for
some trivial test clients.

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

src/lib/elementary/efl_ui_win.c

index dd16e30..7522897 100644 (file)
@@ -1824,10 +1824,10 @@ _elm_win_frame_obj_update(Efl_Ui_Win_Data *sd, Eina_Bool force)
 
    if (!_elm_win_framespace_set(sd, cx, cy, ow - cw, oh - ch) && (!force)) return;
    _elm_win_frame_geometry_adjust(sd);
-   if (sd->first_draw)
-     evas_object_geometry_get(sd->obj, NULL, NULL, &w, &h);
-   else
-     w = ow, h = oh;
+
+   if (!sd->first_draw) return;
+
+   evas_object_geometry_get(sd->obj, NULL, NULL, &w, &h);
    if (w && h)
      TRAP(sd, resize, w, h);
 }