summaryrefslogtreecommitdiff
path: root/content/handlers/text/textplain.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-05-20 23:17:48 +0100
committerVincent Sanders <vince@kyllikki.org>2020-05-20 23:17:48 +0100
commit4cef0f955c3be33344361f84d600bccf1b28ce75 (patch)
tree222d27faab4fa078d183d1771b818c4a6448f5bb /content/handlers/text/textplain.c
parent2f672279014bb6ef2f7b9f346c58d20c7604bad9 (diff)
downloadnetsurf-4cef0f955c3be33344361f84d600bccf1b28ce75.tar.gz
netsurf-4cef0f955c3be33344361f84d600bccf1b28ce75.tar.bz2
pass the browser window to selection click handler
this means the content handlers do not have to provide a separate method to extract their browser window and it can simply be passed in.
Diffstat (limited to 'content/handlers/text/textplain.c')
-rw-r--r--content/handlers/text/textplain.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c
index 501ba1d34..534b91d93 100644
--- a/content/handlers/text/textplain.c
+++ b/content/handlers/text/textplain.c
@@ -706,7 +706,7 @@ textplain_mouse_action(struct content *c,
browser_window_set_drag_type(bw, DRAGGING_NONE, NULL);
idx = textplain_offset_from_coords(c, x, y, dir);
- if (selection_click(&text->sel, mouse, idx)) {
+ if (selection_click(&text->sel, text->bw, mouse, idx)) {
if (selection_dragging(&text->sel)) {
browser_window_set_drag_type(bw,
@@ -1634,15 +1634,3 @@ textplain_get_raw_data(struct content *c,
return text->utf8_data + start;
}
-
-
-/* exported interface documented in html/textplain.h */
-struct browser_window *textplain_get_browser_window(struct content *c)
-{
- textplain_content *text = (textplain_content *) c;
-
- assert(c != NULL);
- assert(c->handler == &textplain_content_handler);
-
- return text->bw;
-}