diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-05-08 20:46:37 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-05-08 20:46:37 +0100 |
commit | 4b8ed9b7775aec686a46b1b2be01a4efa1214e55 (patch) | |
tree | 02c359c4946a039a2a9acf374c6fc29768f13c1c /frontends/gtk/window.h | |
parent | 14e506f89f971ddbe204576092c6ffec59e85248 (diff) | |
download | netsurf-4b8ed9b7775aec686a46b1b2be01a4efa1214e55.tar.gz netsurf-4b8ed9b7775aec686a46b1b2be01a4efa1214e55.tar.bz2 |
GTK: Cause the page-info popup to appear in the right place
To position the page-info window we have to tunnel all the
way from the current scaffolding, via its top-level gui window,
through to the toolbar. In the toolbar we look up the URL bar
and then determine the screen coordinates of the scaffolding
via the top level widget GTK semantics.
Finally we place the page-info window 4 pixels down and right of
the bottom-left of the entry box, which should look nice.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'frontends/gtk/window.h')
-rw-r--r-- | frontends/gtk/window.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/frontends/gtk/window.h b/frontends/gtk/window.h index b126a955f..36166d811 100644 --- a/frontends/gtk/window.h +++ b/frontends/gtk/window.h @@ -19,6 +19,8 @@ #ifndef NETSURF_GTK_WINDOW_H #define NETSURF_GTK_WINDOW_H 1 +struct nsgtk_pi_window; + extern struct gui_window_table *nsgtk_window_table; extern struct gui_search_web_table *nsgtk_search_web_table; @@ -95,5 +97,13 @@ GtkLayout *nsgtk_window_get_layout(struct gui_window *gw); */ nserror nsgtk_window_item_activate(struct gui_window *gw, nsgtk_toolbar_button itemid); +/** + * position page_info appropriately + * + * \param gw The gui window handle to position relative to + * \param win The page-info window to position + */ +nserror nsgtk_window_position_page_info(struct gui_window *gw, + struct nsgtk_pi_window *win); #endif /* NETSURF_GTK_WINDOW_H */ |