From d4c01894c21559cd4199c0f15b9e8b7bec4b692c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 3 Aug 2019 11:58:44 +0100 Subject: change browser_window_get_features to use unscaled coordinates --- content/handlers/html/html.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'content') diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c index a27ebd79a..1bbb4c699 100644 --- a/content/handlers/html/html.c +++ b/content/handlers/html/html.c @@ -1925,8 +1925,11 @@ html_get_contextual_content(struct content *c, int x, int y, } if (box->iframe) { - browser_window_get_features(box->iframe, - x - box_x, y - box_y, data); + browser_window_get_features( + box->iframe, + (x - box_x) * browser_window_get_scale(box->iframe), + (y - box_y) * browser_window_get_scale(box->iframe), + data); } if (box->object) @@ -2001,8 +2004,12 @@ html_scroll_at_point(struct content *c, int x, int y, int scrx, int scry) continue; /* Pass into iframe */ - if (box->iframe && browser_window_scroll_at_point(box->iframe, - x - box_x, y - box_y, scrx, scry) == true) + if (box->iframe && + browser_window_scroll_at_point( + box->iframe, + (x - box_x) * browser_window_get_scale(box->iframe), + (y - box_y) * browser_window_get_scale(box->iframe), + scrx, scry) == true) return true; /* Pass into textarea widget */ -- cgit v1.2.3