From f16d0a13ef9bd9f7f8ec3570fa7196db32f5c083 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 27 Jul 2009 19:32:04 +0000 Subject: [PATCH] fix bug with dialog resize. This nasty bug was more evident with dialog reuse on configuration Basic/Advanced toggle, on some resolutions like 1280x1024 it was always reprodutible. The problem spotted by Manio is that the dialog contents is resized but the window is not. The bug follow is: * window is at some given size (640x512) * user toggles contents, calls e_dialog_show() * bg_object (window contents) is resized to MIN (!!!) * e_win_resize is called with MIN (so far, so good) * something calls e_util_win_auto_resize_fill(), size is back to 640x512 * _e_border_eval() resizes to the last value 640x512, it's unchanged so _ecore_evas_x_resize() checks for size being the same and ignore, not even callking back fn_resize (user callback, _e_dialog_cb_resize). * window is at 640x512, while bg_object is at MIN, BUG! One solution is to never change bg_object from outside _e_dialog_cb_resize, like it's after this patch. The other is to always call fn_resize even if it did not changed, which could lead to lots of useless work. By: manio Confirmed: barbieri SVN revision: 41515 --- src/bin/e_dialog.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c index b43642f10..191890da3 100644 --- a/src/bin/e_dialog.c +++ b/src/bin/e_dialog.c @@ -239,7 +239,6 @@ e_dialog_show(E_Dialog *dia) edje_object_part_swallow(dia->bg_object, "e.swallow.buttons", o); edje_object_size_min_calc(dia->bg_object, &mw, &mh); - evas_object_resize(dia->bg_object, mw, mh); e_win_resize(dia->win, mw, mh); e_win_size_min_set(dia->win, mw, mh); dia->min_w = mw;