diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-08-02 22:07:59 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-08-03 14:29:05 +0100 |
commit | 0a8ed41a1ad470bb62c908d0dc6272c1c541a1f2 (patch) | |
tree | 149a44db1bbea14e8fb4577ad53b01cfc472e527 /frontends/gtk/scaffolding.c | |
parent | 182c4ddefe6c1cd050361febb344ccd8cd5d1c96 (diff) | |
download | netsurf-0a8ed41a1ad470bb62c908d0dc6272c1c541a1f2.tar.gz netsurf-0a8ed41a1ad470bb62c908d0dc6272c1c541a1f2.tar.bz2 |
change browser_window_mouse_click to use unscaled coordinates
this means frontends no longer need to scale mouse click events thus
simplifying their implementation.
Diffstat (limited to 'frontends/gtk/scaffolding.c')
-rw-r--r-- | frontends/gtk/scaffolding.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c index 8c46fd884..6b6f936ff 100644 --- a/frontends/gtk/scaffolding.c +++ b/frontends/gtk/scaffolding.c @@ -2715,10 +2715,14 @@ void nsgtk_scaffolding_context_menu(struct nsgtk_scaffolding *g, gdouble y) { GtkMenu *gtkmenu; + struct browser_window *bw; + float scale; + + bw = nsgtk_get_browser_window(g->top_level); + scale = browser_window_get_scale(bw); /* update the global context menu features */ - browser_window_get_features(nsgtk_get_browser_window(g->top_level), - x, y, ¤t_menu_features); + browser_window_get_features(bw, x/scale, y/scale, ¤t_menu_features); if (current_menu_features.link != NULL) { /* menu is opening over a link */ |