diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-08-16 16:14:15 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-08-16 16:14:15 +0100 |
commit | 6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0 (patch) | |
tree | d650ff031ffd37fb79b363b18f7ba530531c232e /render | |
parent | 195a77a4cd5a0dde92821795caf362b1fef3729b (diff) | |
download | netsurf-6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0.tar.gz netsurf-6daf6c178df8d0b61cc9d7a43a646d5dd43bbab0.tar.bz2 |
Frame drag start function can take child bw. Don't need to get root bw in html handler. Avoids bw dereferences.
Diffstat (limited to 'render')
-rw-r--r-- | render/html_interaction.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/render/html_interaction.c b/render/html_interaction.c index 016e2a198..4cdff7608 100644 --- a/render/html_interaction.c +++ b/render/html_interaction.c @@ -581,19 +581,13 @@ void html_mouse_action(struct content *c, struct browser_window *bw, bool done = false; /* frame resizing */ - if (bw->parent) { - struct browser_window *parent; - for (parent = bw->parent; parent->parent; - parent = parent->parent); - if (browser_window_frame_resize_start(parent, mouse, - x + bw->x, y + bw->y, - &pointer)) { - if (mouse & (BROWSER_MOUSE_DRAG_1 | - BROWSER_MOUSE_DRAG_2)) { - status = messages_get("FrameDrag"); - } - done = true; + if (browser_window_frame_resize_start(bw, mouse, x, y, + &pointer)) { + if (mouse & (BROWSER_MOUSE_DRAG_1 | + BROWSER_MOUSE_DRAG_2)) { + status = messages_get("FrameDrag"); } + done = true; } /* if clicking in the main page, remove the selection from any |