Use browser window scale accessor.

svn path=/trunk/netsurf/; revision=13493
This commit is contained in:
Michael Drake 2012-02-27 22:44:59 +00:00
parent da9a0e9b44
commit 046ee36430
1 changed files with 5 additions and 2 deletions

View File

@ -527,9 +527,12 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
} else if (iframe) { } else if (iframe) {
int pos_x, pos_y; int pos_x, pos_y;
float scale = browser_window_get_scale(bw);
browser_window_get_position(iframe, false, &pos_x, &pos_y); browser_window_get_position(iframe, false, &pos_x, &pos_y);
pos_x /= bw->scale;
pos_y /= bw->scale; pos_x /= scale;
pos_y /= scale;
if (mouse & BROWSER_MOUSE_CLICK_1 || if (mouse & BROWSER_MOUSE_CLICK_1 ||
mouse & BROWSER_MOUSE_CLICK_2) { mouse & BROWSER_MOUSE_CLICK_2) {