diff options
Diffstat (limited to 'render/textplain.c')
-rw-r--r-- | render/textplain.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/render/textplain.c b/render/textplain.c index 71d576579..ec4d486e5 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,27 +687,20 @@ 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 - status = content__get_status_message(c); - } - else { - if (bw->loading_content) - status = content_get_status_message( - bw->loading_content); - else - status = content__get_status_message(c); + } else { if (mouse & (BROWSER_MOUSE_DRAG_1 | BROWSER_MOUSE_DRAG_2)) { browser_window_page_drag_start(bw, x, y); pointer = BROWSER_POINTER_MOVE; } } - if (status != NULL) - browser_window_set_status(bw, status); + msg_data.explicit_status_text = status; + content_broadcast(c, CONTENT_MSG_STATUS, msg_data); msg_data.pointer = pointer; content_broadcast(c, CONTENT_MSG_POINTER, msg_data); |