webkit_dom_event_target_remove_event_listener(
WEBKIT_DOM_EVENT_TARGET(element), "focus", G_CALLBACK(dom_editable_focus_cb), true
);
- if (CLEAN_MODE(vp.state.mode) != VP_MODE_INSERT) {
+ if (GET_CLEAN_MODE() != VP_MODE_INSERT) {
WebKitDOMEventTarget* target = webkit_dom_event_get_target(event);
dom_auto_insert((void*)target);
}
}
/* check for keybinding */
- GSList* link = keybind_find(CLEAN_MODE(vp.state.mode), vp.state.modkey, state, keyval);
+ GSList* link = keybind_find(GET_CLEAN_MODE(), vp.state.modkey, state, keyval);
if (link) {
Keybind* keybind = (Keybind*)link->data;
{
WebKitHitTestResult *result = NULL;
WebKitHitTestResultContext context;
- if (CLEAN_MODE(vp.state.mode) == VP_MODE_NORMAL
+ if (GET_CLEAN_MODE() == VP_MODE_NORMAL
&& event->type == GDK_BUTTON_RELEASE
) {
result = webkit_web_view_get_hit_test_result(vp.gui.webview, (GdkEventButton*)event);
#define GET_TEXT() (gtk_entry_get_text(GTK_ENTRY(vp.gui.inputbox)))
#define CLEAN_MODE(mode) ((mode) & ~(VP_MODE_COMPLETE))
+#define GET_CLEAN_MODE() (CLEAN_MODE(vp.state.mode))
#define CLEAR_INPUT() (vp_echo(VP_MSG_NORMAL, ""))
#ifdef HAS_GTK3