diff options
author | Daniel Carl <danielcarl@gmx.de> | 2012-12-16 19:33:36 +0100 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2012-12-16 19:33:36 +0100 |
commit | 0f0cbb7b97c7f3d7e8c215f65b38f9ba065cbb84 (patch) | |
tree | 050084dc68b63adccc29de5a8d6509337199a180 /src/hints.c | |
parent | f2625d51516f96efc5ae88ae3ac57431320ace14 (diff) |
Dispatch mouseover and mouseout event when focus elements by hinting.
Diffstat (limited to 'src/hints.c')
-rw-r--r-- | src/hints.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hints.c b/src/hints.c index e241cfc..47881a6 100644 --- a/src/hints.c +++ b/src/hints.c @@ -291,16 +291,23 @@ static void hints_create_for_window( static void hints_focus(const gulong num) { + /* TODO use the document the hinted element belongs to */ + Document* doc = webkit_web_view_get_dom_document(vp.gui.webview); Hint* hint = hints_get_hint_by_number(currentFocusNum); if (hint) { /* reset previous focused element */ dom_element_style_set_property(hint->elem, "background-color", ELEM_BACKGROUND); + + dom_dispatch_mouse_event(doc, hint->elem, "mouseout", 0); } hint = hints_get_hint_by_number(num); if (hint) { /* mark new hint as focused */ dom_element_style_set_property(hint->elem, "background-color", ELEM_BACKGROUND_FOCUS); + + dom_dispatch_mouse_event(doc, hint->elem, "mouseover", 0); + webkit_dom_element_focus(hint->elem); } currentFocusNum = num; |