diff --git a/desktop/browser.c b/desktop/browser.c index 836f594e6..f9353afef 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -396,6 +396,8 @@ void browser_window_set_drag_type(struct browser_window *bw, top_bw->drag_window = bw; switch (type) { + case DRAGGING_SELECTION: + return; case DRAGGING_SCR_X: case DRAGGING_SCR_Y: case DRAGGING_CONTENT_SCROLLBAR: @@ -1554,10 +1556,10 @@ nserror browser_window_callback(hlcache_handle *c, bdt = DRAGGING_NONE; break; case CONTENT_DRAG_SCROLL: - bdt = DRAGGING_SELECTION; + bdt = DRAGGING_CONTENT_SCROLLBAR; break; case CONTENT_DRAG_SELECTION: - bdt = DRAGGING_CONTENT_SCROLLBAR; + bdt = DRAGGING_SELECTION; break; } browser_window_set_drag_type(bw, bdt, event->data.drag.rect); diff --git a/render/html_interaction.c b/render/html_interaction.c index c33d654a7..dfebc2577 100644 --- a/render/html_interaction.c +++ b/render/html_interaction.c @@ -943,6 +943,7 @@ void html_overflow_scroll_drag_end(struct scrollbar *scrollbar, } } +/* Documented in html_internal.h */ void html_set_drag_type(html_content *html, html_drag_type drag_type, union html_drag_owner drag_owner, const struct rect *rect) { diff --git a/render/html_internal.h b/render/html_internal.h index 85f3f8a70..3e562bc39 100644 --- a/render/html_internal.h +++ b/render/html_internal.h @@ -141,6 +141,14 @@ void html_set_status(html_content *c, const char *extra); void html__redraw_a_box(html_content *html, struct box *box); +/** + * Set our drag status, and inform whatever owns the content + * + * \param html HTML content + * \param drag_type Type of drag + * \param drag_owner What owns the drag + * \param rect Pointer movement bounds + */ void html_set_drag_type(html_content *html, html_drag_type drag_type, union html_drag_owner drag_owner, const struct rect *rect);