diff --git a/content/content.h b/content/content.h index f3a443868..d0b525c85 100644 --- a/content/content.h +++ b/content/content.h @@ -76,7 +76,8 @@ typedef enum { CONTENT_MSG_GETCTX, /**< Javascript context */ CONTENT_MSG_SCROLL, /**< Request to scroll content */ CONTENT_MSG_DRAGSAVE, /**< Allow drag saving of content */ - CONTENT_MSG_SAVELINK /**< Allow URL to be saved */ + CONTENT_MSG_SAVELINK, /**< Allow URL to be saved */ + CONTENT_MSG_POINTER /**< Wants a specific mouse pointer set */ } content_msg; /** RFC5988 metadata link */ @@ -145,6 +146,8 @@ union content_msg_data { const char *url; const char *title; } savelink; + /** CONTENT_MSG_POINTER - Mouse pointer to set */ + browser_pointer_shape pointer; }; /** parameters to content redraw */ diff --git a/desktop/browser.c b/desktop/browser.c index 3c99c5fb4..f9519b011 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1483,6 +1483,11 @@ nserror browser_window_callback(hlcache_handle *c, } break; + case CONTENT_MSG_POINTER: + /* Content wants to have specific mouse pointer */ + browser_window_set_pointer(bw, event->data.pointer); + break; + default: assert(0); } diff --git a/render/html.c b/render/html.c index 7c7b797ba..ed7e7ebaa 100644 --- a/render/html.c +++ b/render/html.c @@ -1252,6 +1252,11 @@ html_object_callback(hlcache_handle *object, content_broadcast(&c->base, CONTENT_MSG_SAVELINK, event->data); break; + case CONTENT_MSG_POINTER: + /* Pass it on */ + content_broadcast(&c->base, CONTENT_MSG_POINTER, event->data); + break; + default: assert(0); }