changeset 1857:b5825a55b34c

better menu positioning
author corvid <corvid@lavabit.com>
date Sat, 22 Jan 2011 07:22:24 +0000
parents 4f350c333bf1
children 58d86abb6b3f
files src/menu.cc
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/menu.cc	Sat Jan 22 06:09:02 2011 +0000
+++ b/src/menu.cc	Sat Jan 22 07:22:24 2011 +0000
@@ -573,6 +573,8 @@
    int i, n;
 
    popup_bw = bw;
+   popup_x = Fl::event_x();
+   popup_y = Fl::event_y();
    history_direction = direction;
 
    // TODO: hook popdown event with delete or similar.
@@ -665,7 +667,7 @@
    if (prefs.load_images)
       pm[2].set();
 
-   item = pm->popup(wid->x(), wid->y());
+   item = pm->popup(wid->x(), wid->y() + wid->h());
    if (item)
       ((Fl_Widget *)item)->do_callback();
 }