From 8e315f9f8fceb6cc847fddd30095c2460b7cd637 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 17 Aug 2012 10:02:10 +0100 Subject: Set content handlers now set pointer via content msg. --- render/html_interaction.c | 14 +++++++++----- render/textplain.c | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/render/html_interaction.c b/render/html_interaction.c index a3cfaa95f..1365d77e0 100644 --- a/render/html_interaction.c +++ b/render/html_interaction.c @@ -829,8 +829,10 @@ void html_mouse_action(struct content *c, struct browser_window *bw, content_broadcast(c, CONTENT_MSG_STATUS, msg_data); } - if (!iframe) - browser_window_set_pointer(bw, pointer); + if (!iframe) { + msg_data.pointer = pointer; + content_broadcast(c, CONTENT_MSG_POINTER, msg_data); + } /* deferred actions that can cause this browser_window to be destroyed * and must therefore be done after set_status/pointer @@ -861,6 +863,7 @@ void html_overflow_scroll_callback(void *client_data, struct html_scrollbar_data *data = client_data; html_content *html = (html_content *)data->c; struct box *box = data->box; + union content_msg_data msg_data; switch(scrollbar_data->msg) { case SCROLLBAR_MSG_MOVED: @@ -885,9 +888,10 @@ void html_overflow_scroll_callback(void *client_data, browser_window_set_drag_type(html->bw, DRAGGING_NONE, NULL); - - browser_window_set_pointer(html->bw, - BROWSER_POINTER_DEFAULT); + + msg_data.pointer = BROWSER_POINTER_AUTO; + content_broadcast(data->c, CONTENT_MSG_POINTER, + msg_data); break; } } diff --git a/render/textplain.c b/render/textplain.c index 7411e3b75..71d576579 100644 --- a/render/textplain.c +++ b/render/textplain.c @@ -676,6 +676,7 @@ void textplain_mouse_action(struct content *c, struct browser_window *bw, { textplain_content *text = (textplain_content *) c; browser_pointer_shape pointer = BROWSER_POINTER_DEFAULT; + union content_msg_data msg_data; const char *status = 0; size_t idx; int dir = 0; @@ -708,7 +709,8 @@ void textplain_mouse_action(struct content *c, struct browser_window *bw, if (status != NULL) browser_window_set_status(bw, status); - browser_window_set_pointer(bw, pointer); + msg_data.pointer = pointer; + content_broadcast(c, CONTENT_MSG_POINTER, msg_data); } -- cgit v1.2.3