diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/menu.cc | 6 | ||||
-rw-r--r-- | src/menu.hh | 2 | ||||
-rw-r--r-- | src/ui.cc | 6 | ||||
-rw-r--r-- | src/uicmd.cc | 8 | ||||
-rw-r--r-- | src/uicmd.hh | 4 |
5 files changed, 14 insertions, 12 deletions
diff --git a/src/menu.cc b/src/menu.cc index f9babb0b..f0c1ce5b 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -528,14 +528,14 @@ void a_Menu_bugmeter_popup(BrowserWindow *bw, const DilloUrl *url) * * direction: {backward = -1, forward = 1} */ -void a_Menu_history_popup(BrowserWindow *bw, int direction) +void a_Menu_history_popup(BrowserWindow *bw, int x, int y, int direction) { static Fl_Menu_Item *pm = 0; int i, n; popup_bw = bw; - popup_x = Fl::event_x(); - popup_y = Fl::event_y(); + popup_x = x; + popup_y = y; history_direction = direction; // TODO: hook popdown event with delete or similar. diff --git a/src/menu.hh b/src/menu.hh index 668de001..f8fa1fea 100644 --- a/src/menu.hh +++ b/src/menu.hh @@ -17,7 +17,7 @@ void a_Menu_form_popup(BrowserWindow *bw, const DilloUrl *page_url, void *vform, bool_t showing_hiddens); void a_Menu_file_popup(BrowserWindow *bw, void *v_wid); void a_Menu_bugmeter_popup(BrowserWindow *bw, const DilloUrl *url); -void a_Menu_history_popup(BrowserWindow *bw, int direction); +void a_Menu_history_popup(BrowserWindow *bw, int x, int y, int direction); void a_Menu_tools_popup(BrowserWindow *bw, void *v_wid); @@ -305,14 +305,16 @@ static void b1_cb(Fl_Widget *wid, void *cb_data) if (b == FL_LEFT_MOUSE) { a_UIcmd_back(a_UIcmd_get_bw_by_widget(wid)); } else if (b == FL_RIGHT_MOUSE) { - a_UIcmd_back_popup(a_UIcmd_get_bw_by_widget(wid)); + a_UIcmd_back_popup(a_UIcmd_get_bw_by_widget(wid), wid->x(), + wid->y() + wid->h()); } break; case UI_FORW: if (b == FL_LEFT_MOUSE) { a_UIcmd_forw(a_UIcmd_get_bw_by_widget(wid)); } else if (b == FL_RIGHT_MOUSE) { - a_UIcmd_forw_popup(a_UIcmd_get_bw_by_widget(wid)); + a_UIcmd_forw_popup(a_UIcmd_get_bw_by_widget(wid), wid->x(), + wid->y() + wid->h()); } break; case UI_HOME: diff --git a/src/uicmd.cc b/src/uicmd.cc index 35463c57..180ce7d2 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -686,9 +686,9 @@ void a_UIcmd_back(void *vbw) /* * Popup the navigation menu of the Back button */ -void a_UIcmd_back_popup(void *vbw) +void a_UIcmd_back_popup(void *vbw, int x, int y) { - a_Menu_history_popup((BrowserWindow*)vbw, -1); + a_Menu_history_popup((BrowserWindow*)vbw, x, y, -1); } /* @@ -702,9 +702,9 @@ void a_UIcmd_forw(void *vbw) /* * Popup the navigation menu of the Forward button */ -void a_UIcmd_forw_popup(void *vbw) +void a_UIcmd_forw_popup(void *vbw, int x, int y) { - a_Menu_history_popup((BrowserWindow*)vbw, 1); + a_Menu_history_popup((BrowserWindow*)vbw, x, y, 1); } /* diff --git a/src/uicmd.hh b/src/uicmd.hh index 22c5b118..8989782d 100644 --- a/src/uicmd.hh +++ b/src/uicmd.hh @@ -17,9 +17,9 @@ void a_UIcmd_open_url(BrowserWindow *bw, const DilloUrl *url); void a_UIcmd_open_url_nw(BrowserWindow *bw, const DilloUrl *url); void a_UIcmd_open_url_nt(void *vbw, const DilloUrl *url, int focus); void a_UIcmd_back(void *vbw); -void a_UIcmd_back_popup(void *vbw); +void a_UIcmd_back_popup(void *vbw, int x, int y); void a_UIcmd_forw(void *vbw); -void a_UIcmd_forw_popup(void *vbw); +void a_UIcmd_forw_popup(void *vbw, int x, int y); void a_UIcmd_home(void *vbw); void a_UIcmd_reload(void *vbw); void a_UIcmd_repush(void *vbw); |