summaryrefslogtreecommitdiff
path: root/render/html.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-07-01 11:16:43 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-07-01 11:16:43 +0000
commitf9566b64050c76c9fc78a0b691cf8c83643c847b (patch)
tree1e4027e033afd695a38997c08c5583995f4b0856 /render/html.c
parent5639e1e04772db96a7772ec8ba4facf5bf5e6d40 (diff)
downloadnetsurf-f9566b64050c76c9fc78a0b691cf8c83643c847b.tar.gz
netsurf-f9566b64050c76c9fc78a0b691cf8c83643c847b.tar.bz2
Set/unset selection context's browser window on content_open/content_close.
svn path=/trunk/netsurf/; revision=12551
Diffstat (limited to 'render/html.c')
-rw-r--r--render/html.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/render/html.c b/render/html.c
index a45e26b7e..d77cfd981 100644
--- a/render/html.c
+++ b/render/html.c
@@ -34,6 +34,7 @@
#include "desktop/browser.h"
#include "desktop/gui.h"
#include "desktop/options.h"
+#include "desktop/selection.h"
#include "image/bitmap.h"
#include "render/box.h"
#include "render/font.h"
@@ -1929,6 +1930,8 @@ void html_open(struct content *c, struct browser_window *bw,
html->page = (html_content *) page;
html->box = box;
+ selection_set_browser_window(bw->sel, bw);
+
for (object = html->object_list; object != NULL; object = next) {
next = object->next;
@@ -1955,6 +1958,9 @@ void html_close(struct content *c)
html_content *html = (html_content *) c;
struct content_html_object *object, *next;
+ if (html->bw && html->bw->sel)
+ selection_set_browser_window(html->bw->sel, NULL);
+
html->bw = NULL;
for (object = html->object_list; object != NULL; object = next) {