summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 14:07:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 14:20:03 +0900
commitd24dcb3c24d619d7f268d227b3fb5eac44993cdd (patch)
treed1b7656a3433fcf52d9d4e663b08384f7b20b35b /src/lib/elementary/efl_ui_win.c
parent994d32f2a8338654e3e985ef5cecdebbcd7b8e62 (diff)
efl: Use Eina.Size2D for size hint max
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_win.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 275d33fbbb..c32754e97c 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -852,15 +852,16 @@ _elm_win_obj_intercept_layer_set(void *data, Evas_Object *obj EINA_UNUSED, int l
852static void 852static void
853_elm_win_size_hints_update(Efl_Ui_Win *win, Efl_Ui_Win_Data *sd) 853_elm_win_size_hints_update(Efl_Ui_Win *win, Efl_Ui_Win_Data *sd)
854{ 854{
855 Evas_Coord minw, minh, maxw, maxh; 855 Evas_Coord minw, minh;
856 Eina_Size2D max;
856 857
857 efl_gfx_size_hint_combined_min_get(win, &minw, &minh); 858 efl_gfx_size_hint_combined_min_get(win, &minw, &minh);
858 efl_gfx_size_hint_max_get(win, &maxw, &maxh); 859 max = efl_gfx_size_hint_max_get(win);
859 if (maxw < 1) maxw = -1; 860 if (max.w < 1) max.w = -1;
860 if (maxh < 1) maxh = -1; 861 if (max.h < 1) max.h = -1;
861 862
862 TRAP(sd, size_min_set, minw, minh); 863 TRAP(sd, size_min_set, minw, minh);
863 TRAP(sd, size_max_set, maxw, maxh); 864 TRAP(sd, size_max_set, max.w, max.h);
864} 865}
865 866
866static void 867static void
@@ -1614,7 +1615,7 @@ _elm_win_state_change(Ecore_Evas *ee)
1614 if (ch_wm_rotation) 1615 if (ch_wm_rotation)
1615 { 1616 {
1616 efl_gfx_size_hint_restricted_min_set(obj, -1, -1); 1617 efl_gfx_size_hint_restricted_min_set(obj, -1, -1);
1617 efl_gfx_size_hint_max_set(obj, -1, -1); 1618 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(-1, -1));
1618#ifdef HAVE_ELEMENTARY_X 1619#ifdef HAVE_ELEMENTARY_X
1619 ELM_WIN_DATA_ALIVE_CHECK(obj, sd); 1620 ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
1620 _elm_win_xwin_update(sd); 1621 _elm_win_xwin_update(sd);
@@ -3495,7 +3496,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
3495 3496
3496 sd->tmp_updating_hints = 1; 3497 sd->tmp_updating_hints = 1;
3497 efl_gfx_size_hint_restricted_min_set(obj, minw, minh); 3498 efl_gfx_size_hint_restricted_min_set(obj, minw, minh);
3498 efl_gfx_size_hint_max_set(obj, maxw, maxh); 3499 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(maxw, maxh));
3499 sd->tmp_updating_hints = 0; 3500 sd->tmp_updating_hints = 0;
3500 _elm_win_size_hints_update(obj, sd); 3501 _elm_win_size_hints_update(obj, sd);
3501 3502
@@ -5992,18 +5993,18 @@ _efl_ui_win_efl_gfx_size_hint_hint_step_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data
5992} 5993}
5993 5994
5994EOLIAN static void 5995EOLIAN static void
5995_efl_ui_win_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Win_Data *sd, int w, int h) 5996_efl_ui_win_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Size2D sz)
5996{ 5997{
5997 if (sd->tmp_updating_hints) 5998 if (sd->tmp_updating_hints)
5998 { 5999 {
5999 efl_gfx_size_hint_max_set(efl_super(obj, MY_CLASS), w, h); 6000 efl_gfx_size_hint_max_set(efl_super(obj, MY_CLASS), sz);
6000 } 6001 }
6001 else 6002 else
6002 { 6003 {
6003 if (w < 1) w = -1; 6004 if (sz.w < 1) sz.w = -1;
6004 if (h < 1) h = -1; 6005 if (sz.h < 1) sz.h = -1;
6005 sd->max_w = w; 6006 sd->max_w = sz.w;
6006 sd->max_h = h; 6007 sd->max_h = sz.h;
6007 _elm_win_resize_objects_eval(obj, EINA_FALSE); 6008 _elm_win_resize_objects_eval(obj, EINA_FALSE);
6008 } 6009 }
6009} 6010}
@@ -6079,7 +6080,7 @@ _win_rotate(Evas_Object *obj, Efl_Ui_Win_Data *sd, int rotation, Eina_Bool resiz
6079 if (resize) TRAP(sd, rotation_with_resize_set, rotation); 6080 if (resize) TRAP(sd, rotation_with_resize_set, rotation);
6080 else TRAP(sd, rotation_set, rotation); 6081 else TRAP(sd, rotation_set, rotation);
6081 efl_gfx_size_hint_restricted_min_set(obj, -1, -1); 6082 efl_gfx_size_hint_restricted_min_set(obj, -1, -1);
6082 efl_gfx_size_hint_max_set(obj, -1, -1); 6083 efl_gfx_size_hint_max_set(obj, EINA_SIZE2D(-1, -1));
6083 _elm_win_resize_objects_eval(obj, EINA_FALSE); 6084 _elm_win_resize_objects_eval(obj, EINA_FALSE);
6084#ifdef HAVE_ELEMENTARY_X 6085#ifdef HAVE_ELEMENTARY_X
6085 _elm_win_xwin_update(sd); 6086 _elm_win_xwin_update(sd);