From dde300ea7d06a841be7653febedc1477fa758ead Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 2 Jul 2011 12:18:04 +0000 Subject: Set selection browser window as before, for now. svn path=/trunk/netsurf/; revision=12553 --- desktop/browser.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/desktop/browser.c b/desktop/browser.c index cc19ccdc0..827896835 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -292,6 +292,7 @@ struct browser_window *browser_window_create(const char *url, bw->focus = bw; bw->sel = selection_create(); + selection_set_browser_window(bw->sel, bw); /* gui window */ /* from the front end's pov, it clones the top level browser window, @@ -1682,6 +1683,10 @@ void browser_window_mouse_track(struct browser_window *bw, browser_window_mouse_drag_end(bw, mouse, x, y); } + if (bw->drag_type != DRAGGING_NONE) { + selection_set_browser_window(bw->sel, bw); + } + if (bw->drag_type == DRAGGING_FRAME) { browser_window_resize_frame(bw, bw->x0 + x, bw->y0 + y); } else if (bw->drag_type == DRAGGING_PAGE_SCROLL) { @@ -1736,6 +1741,8 @@ void browser_window_mouse_click(struct browser_window *bw, top = browser_window_get_root(bw); top->focus = bw; + selection_set_browser_window(bw->sel, bw); + switch (content_get_type(c)) { case CONTENT_HTML: case CONTENT_TEXTPLAIN: -- cgit v1.2.3