From 6d8aee1354fb5568440cc34ecf2aa92dd56a52b0 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 13 Jul 2012 10:52:57 +0000 Subject: [PATCH] fix tooltips flying off the top of the screen, also prevent crash when changing directories with tooltip up SVN revision: 73810 --- src/modules/fileman/e_fwin.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c index bd1937bfa..6c91c1df9 100644 --- a/src/modules/fileman/e_fwin.c +++ b/src/modules/fileman/e_fwin.c @@ -611,6 +611,9 @@ _e_fwin_icon_popup(void *data) /* fuck this, stick it right on the icon */ if (px + mw + 3 > zone->w) px = (x + w / 2) - (mw / 2); + /* give up */ + if (px < 0) px = 0; + /* prefer tooltip above icon */ py = (fy + y) - mh - 3; /* if it's offscreen, try below icon */ @@ -618,6 +621,8 @@ _e_fwin_icon_popup(void *data) /* fuck this, stick it right on the icon */ if (py + mh + 3 > zone->h) py = (y + h / 2) - (mh / 2); + /* give up */ + if (py < 0) py = 0; e_popup_move_resize(fwin->popup, px, py, mw, mh); evas_object_resize(bg, mw, mh); e_popup_show(fwin->popup); @@ -1435,6 +1440,7 @@ _e_fwin_changed(void *data, else e_fm2_custom_theme_set(obj, NULL); + _e_fwin_icon_mouse_out(fwin, NULL, NULL); if (fwin->zone) return; _e_fwin_window_title_set(page); }