diff options
author | Daniel Carl <danielcarl@gmx.de> | 2012-12-16 19:13:21 +0100 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2012-12-16 19:14:19 +0100 |
commit | f2625d51516f96efc5ae88ae3ac57431320ace14 (patch) | |
tree | 3273e34534f0698ce97fede8b4072017e58517d2 /src/hints.c | |
parent | 2a74b3567a02022386ca326c2233a7b1b5c5ac56 (diff) |
Use mouse event to open hint instead of c logic.
Diffstat (limited to 'src/hints.c')
-rw-r--r-- | src/hints.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/hints.c b/src/hints.c index 35ed56d..e241cfc 100644 --- a/src/hints.c +++ b/src/hints.c @@ -310,19 +310,14 @@ static void hints_fire(const gulong num) { Hint* hint = hints_get_hint_by_number(num); if (hint) { - Element* element = hint->elem; /* TODO * if the elemt has a target attribute - remove it temporary * fire mousedown and click events on the element - * if it is an form element focus it and return - * get the src or href attribute and call vp_fired_hint */ - - Arg a; - a.i = currentMode; - a.s = webkit_dom_html_anchor_element_get_href(WEBKIT_DOM_HTML_ANCHOR_ELEMENT(element)); - vp_fired_hint(&a); - + * if it is an form element focus it and return */ + Document* doc = webkit_web_view_get_dom_document(vp.gui.webview); + dom_dispatch_mouse_event(doc, hint->elem, "click", 0); hints_clear(); + vp_clean_input(); } } |