diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-08-18 22:45:17 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-08-18 22:45:17 +0100 |
commit | c4b284e43c1aad1d825152de89ab2894df1fac3f (patch) | |
tree | debec66e5a9908db22c6a195fb5424bff613c6f0 /render/textplain.c | |
parent | 5a2d4c6ddbb61c53cee48c721f9f21f111db219b (diff) | |
download | netsurf-c4b284e43c1aad1d825152de89ab2894df1fac3f.tar.gz netsurf-c4b284e43c1aad1d825152de89ab2894df1fac3f.tar.bz2 |
Use interface to set drag type. Longer term, it would be better to avoid using bw altogether.
Diffstat (limited to 'render/textplain.c')
-rw-r--r-- | render/textplain.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/render/textplain.c b/render/textplain.c index 71d576579..a8fd8a0f6 100644 --- a/render/textplain.c +++ b/render/textplain.c @@ -628,7 +628,7 @@ void textplain_mouse_track(struct content *c, struct browser_window *bw, { textplain_content *text = (textplain_content *) c; - if (bw->drag_type == DRAGGING_SELECTION && !mouse) { + if (browser_window_get_drag_type(bw) == DRAGGING_SELECTION && !mouse) { int dir = -1; size_t idx; @@ -641,7 +641,7 @@ void textplain_mouse_track(struct content *c, struct browser_window *bw, browser_window_set_drag_type(bw, DRAGGING_NONE, NULL); } - switch (bw->drag_type) { + switch (browser_window_get_drag_type(bw)) { case DRAGGING_SELECTION: { int dir = -1; @@ -687,7 +687,8 @@ void textplain_mouse_action(struct content *c, struct browser_window *bw, if (selection_click(&text->sel, mouse, idx)) { if (selection_dragging(&text->sel)) { - bw->drag_type = DRAGGING_SELECTION; + browser_window_set_drag_type(bw, + DRAGGING_SELECTION, NULL); status = messages_get("Selecting"); } else |