Fix mouse action offsets within scaled iframes.

svn path=/trunk/netsurf/; revision=12503
This commit is contained in:
Michael Drake 2011-06-24 12:23:10 +00:00
parent dea7683985
commit 2fb134bac7
1 changed files with 2 additions and 0 deletions

View File

@ -471,6 +471,8 @@ 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;
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;
if (mouse & BROWSER_MOUSE_CLICK_1 || if (mouse & BROWSER_MOUSE_CLICK_1 ||
mouse & BROWSER_MOUSE_CLICK_2) { mouse & BROWSER_MOUSE_CLICK_2) {