gui: make key optional in gui_focus_to_hashtable
This commit is contained in:
parent
3f0c6ac96b
commit
a5b851826e
@ -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,7 +155,8 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key)
|
||||
return NULL;
|
||||
|
||||
/* key (key from keyboard or mouse event) */
|
||||
HASHTABLE_SET_STR("_key", key);
|
||||
if (key)
|
||||
HASHTABLE_SET_STR("_key", key);
|
||||
|
||||
/* x,y */
|
||||
HASHTABLE_SET_INT("_x", focus_info->x);
|
||||
@ -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 */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user