From c4b284e43c1aad1d825152de89ab2894df1fac3f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 18 Aug 2012 22:45:17 +0100 Subject: Use interface to set drag type. Longer term, it would be better to avoid using bw altogether. --- render/textplain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'render') 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 -- cgit v1.2.3