forked from enlightenment/enlightenment
limit menus to 2048x2048 due to them now being abused for filemanager...
SVN revision: 74992
This commit is contained in:
parent
3f1c68dbd0
commit
a3df76badf
|
@ -84,6 +84,8 @@ static Eina_Bool _e_menu_cb_window_shape(void *data, int ev_type, void *ev);
|
|||
static void _e_menu_cb_item_submenu_post_default(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static Eina_Bool _e_menu_categories_free_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata);
|
||||
|
||||
#define MAX_MENU_SIZE 2048
|
||||
|
||||
/* local subsystem globals */
|
||||
static Ecore_X_Window _e_menu_win = 0;
|
||||
static Eina_List *_e_active_menus = NULL;
|
||||
|
@ -1052,10 +1054,16 @@ e_menu_idler_before(void)
|
|||
if (((m->cur.w) != (m->prev.w)) ||
|
||||
((m->cur.h) != (m->prev.h)))
|
||||
{
|
||||
int w, h;
|
||||
|
||||
m->prev.w = m->cur.w;
|
||||
m->prev.h = m->cur.h;
|
||||
ecore_evas_resize(m->ecore_evas, m->cur.w, m->cur.h);
|
||||
e_container_shape_resize(m->shape, m->cur.w, m->cur.h);
|
||||
w = m->cur.w;
|
||||
h = m->cur.h;
|
||||
if (w > MAX_MENU_SIZE) w = MAX_MENU_SIZE;
|
||||
if (h > MAX_MENU_SIZE) h = MAX_MENU_SIZE;
|
||||
ecore_evas_resize(m->ecore_evas, w, h);
|
||||
e_container_shape_resize(m->shape, w, h);
|
||||
}
|
||||
if (((m->cur.x) != (m->prev.x)) ||
|
||||
((m->cur.y) != (m->prev.y)))
|
||||
|
@ -1546,6 +1554,7 @@ _e_menu_realize(E_Menu *m)
|
|||
Eina_List *l;
|
||||
E_Menu_Item *mi;
|
||||
int ok = 0;
|
||||
int w, h;
|
||||
|
||||
if (m->realized) return;
|
||||
m->realized = 1;
|
||||
|
@ -1556,7 +1565,11 @@ _e_menu_realize(E_Menu *m)
|
|||
eina_hash_add(_e_menu_hash, e_util_winid_str_get(m->evas_win), m);
|
||||
m->shape = e_container_shape_add(m->zone->container);
|
||||
e_container_shape_move(m->shape, m->cur.x, m->cur.y);
|
||||
e_container_shape_resize(m->shape, m->cur.w, m->cur.h);
|
||||
w = m->cur.w;
|
||||
h = m->cur.h;
|
||||
if (w > MAX_MENU_SIZE) w = MAX_MENU_SIZE;
|
||||
if (h > MAX_MENU_SIZE) h = MAX_MENU_SIZE;
|
||||
e_container_shape_resize(m->shape, w, h);
|
||||
|
||||
ecore_evas_callback_resize_set(m->ecore_evas, _e_menu_cb_ecore_evas_resize);
|
||||
m->evas = ecore_evas_get(m->ecore_evas);
|
||||
|
@ -1574,7 +1587,7 @@ _e_menu_realize(E_Menu *m)
|
|||
evas_object_name_set(o, "menu/background");
|
||||
evas_object_data_set(o, "e_menu", m);
|
||||
evas_object_move(o, 0, 0);
|
||||
evas_object_resize(o, m->cur.w, m->cur.h);
|
||||
evas_object_resize(o, w, h);
|
||||
ok = e_theme_edje_object_set(o, "base/theme/menus",
|
||||
"e/widgets/menu/default/background");
|
||||
if (ok)
|
||||
|
@ -1625,7 +1638,7 @@ _e_menu_realize(E_Menu *m)
|
|||
|
||||
_e_menu_items_layout_update(m);
|
||||
e_box_thaw(m->container_object);
|
||||
evas_object_resize(m->bg_object, m->cur.w, m->cur.h);
|
||||
evas_object_resize(m->bg_object, w, h);
|
||||
evas_event_thaw(m->evas);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue