From 698f391289d8c53c19b170dd3b726314ba394826 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 8 Feb 2013 15:26:24 +0000 Subject: Add scrollwheel support to textareas. --- render/html.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'render') diff --git a/render/html.c b/render/html.c index 3a7e3c831..1eb0f91f1 100644 --- a/render/html.c +++ b/render/html.c @@ -35,6 +35,7 @@ #include "desktop/options.h" #include "desktop/selection.h" #include "desktop/scrollbar.h" +#include "desktop/textarea.h" #include "image/bitmap.h" #include "render/box.h" #include "render/font.h" @@ -2681,6 +2682,14 @@ html_scroll_at_point(struct content *c, int x, int y, int scrx, int scry) x - box_x, y - box_y, scrx, scry) == true) return true; + /* Pass into textarea widget */ + if (box->gadget && (box->gadget->type == GADGET_TEXTAREA || + box->gadget->type == GADGET_PASSWORD || + box->gadget->type == GADGET_TEXTBOX) && + textarea_scroll(box->gadget->data.text.ta, + scrx, scry) == true) + return true; + /* Pass into object */ if (box->object != NULL && content_scroll_at_point( box->object, x - box_x, y - box_y, -- cgit v1.2.3