summaryrefslogtreecommitdiff
path: root/src/hints.c
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2012-12-16 19:13:21 +0100
committerDaniel Carl <danielcarl@gmx.de>2012-12-16 19:14:19 +0100
commitf2625d51516f96efc5ae88ae3ac57431320ace14 (patch)
tree3273e34534f0698ce97fede8b4072017e58517d2 /src/hints.c
parent2a74b3567a02022386ca326c2233a7b1b5c5ac56 (diff)
Use mouse event to open hint instead of c logic.
Diffstat (limited to 'src/hints.c')
-rw-r--r--src/hints.c13
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();
}
}