gui: make key optional in gui_focus_to_hashtable

This commit is contained in:
Simmo Saan 2018-09-01 15:26:19 +03:00 committed by Sébastien Helleu
parent 3f0c6ac96b
commit a5b851826e

View File

@ -133,7 +133,7 @@ gui_focus_buffer_localvar_map_cb (void *data,
}
/*
* Adds two focus info into hashtable.
* Adds focus info into hashtable.
*
* Returns pointer to new hashtable.
*
@ -155,6 +155,7 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key)
return NULL;
/* key (key from keyboard or mouse event) */
if (key)
HASHTABLE_SET_STR("_key", key);
/* x,y */
@ -308,8 +309,6 @@ gui_focus_info_hashtable_gui_focus_info_cb (const void *pointer, void *data,
if (!focus_hashtable)
return NULL;
hashtable_remove (focus_hashtable, "_key"); /* remove useless key */
/* run hook_focus callbacks that add extra data */
ret_hashtable = hook_focus_get_data (focus_hashtable, NULL); /* no gesture */