summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-07-21 16:17:55 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-07-21 16:17:53 -0400
commit5acd75c0c9530833149137d59d1f60954a06323f (patch)
tree030b44274a024649b2f6b05d8c1036d170dca34c /src/lib/elementary/efl_ui_win.c
parent10516fa3fd2ba7383bf8012a96decc8f7f4b033c (diff)
elm_win: do not set invalid geometries on the window object
clamping to 1x1 is not valid, neither is trying to always position at 0,0 #IGot99TicketsBut1x1AintOne
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_win.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index d9b48985f3..50c3bb834d 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3439,8 +3439,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
3439 double wx, wy; 3439 double wx, wy;
3440 3440
3441 efl_gfx_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh); 3441 efl_gfx_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh);
3442 if (minw < 1) minw = 1; 3442 if ((!minw) && (!minh)) return;
3443 if (minh < 1) minh = 1;
3444 3443
3445 // If content has a weight, make resizable 3444 // If content has a weight, make resizable
3446 efl_gfx_size_hint_weight_get(sd->legacy.edje, &wx, &wy); 3445 efl_gfx_size_hint_weight_get(sd->legacy.edje, &wx, &wy);
@@ -4383,7 +4382,8 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style)
4383 _elm_win_frame_style_update(sd, 1, 1); 4382 _elm_win_frame_style_update(sd, 1, 1);
4384 _elm_win_frame_geometry_adjust(sd); 4383 _elm_win_frame_geometry_adjust(sd);
4385 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h); 4384 ecore_evas_geometry_get(sd->ee, NULL, NULL, &w, &h);
4386 ecore_evas_resize(sd->ee, w, h); 4385 if ((w > 1) && (h > 1))
4386 ecore_evas_resize(sd->ee, w, h);
4387} 4387}
4388 4388
4389static void 4389static void
@@ -4890,7 +4890,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Elm_W
4890 for (i = 0; i < p; i++) 4890 for (i = 0; i < p; i++)
4891 { 4891 {
4892 if (!strcmp(enginelist[i], ELM_SOFTWARE_X11)) 4892 if (!strcmp(enginelist[i], ELM_SOFTWARE_X11))
4893 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 1, 1); 4893 tmp_sd.ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 0, 0);
4894 else if (!strcmp(enginelist[i], ELM_OPENGL_X11)) 4894 else if (!strcmp(enginelist[i], ELM_OPENGL_X11))
4895 { 4895 {
4896 int opt[20], opt_i = 0; 4896 int opt[20], opt_i = 0;
@@ -4917,14 +4917,14 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Elm_W
4917 } 4917 }
4918 opt[opt_i] = 0; 4918 opt[opt_i] = 0;
4919 if (opt_i > 0) 4919 if (opt_i > 0)
4920 tmp_sd.ee = ecore_evas_gl_x11_options_new(NULL, 0, 0, 0, 1, 1, opt); 4920 tmp_sd.ee = ecore_evas_gl_x11_options_new(NULL, 0, 0, 0, 0, 0, opt);
4921 else 4921 else
4922 tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 1, 1); 4922 tmp_sd.ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 0, 0);
4923 } 4923 }
4924 else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM)) 4924 else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM))
4925 tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 1, 0); 4925 tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 0, 0, 0);
4926 else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL)) 4926 else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL))
4927 tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 1, 0); 4927 tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 0, 0, 0);
4928 else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32)) 4928 else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32))
4929 tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1); 4929 tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
4930 else if (!strcmp(enginelist[i], ELM_SOFTWARE_DDRAW)) 4930 else if (!strcmp(enginelist[i], ELM_SOFTWARE_DDRAW))
@@ -5097,8 +5097,6 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Elm_W
5097 sd->evas = ecore_evas_get(sd->ee); 5097 sd->evas = ecore_evas_get(sd->ee);
5098 5098
5099 evas_object_color_set(obj, 0, 0, 0, 0); 5099 evas_object_color_set(obj, 0, 0, 0, 0);
5100 evas_object_move(obj, 0, 0);
5101 evas_object_resize(obj, 1, 1);
5102 evas_object_pass_events_set(obj, EINA_TRUE); 5100 evas_object_pass_events_set(obj, EINA_TRUE);
5103 5101
5104 if (type == ELM_WIN_INLINED_IMAGE) 5102 if (type == ELM_WIN_INLINED_IMAGE)