mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 06:42:28 +00:00
Remove the binding pool entry from the list
When removing a binding entry from the binding pool we should not only remove it from the hash table, but also from the linked list we use to iterate over inside the block/unblock_action() pair.
This commit is contained in:
parent
c988b7b736
commit
700b34148b
@ -650,6 +650,7 @@ clutter_binding_pool_remove_action (ClutterBindingPool *pool,
|
||||
ClutterModifierType modifiers)
|
||||
{
|
||||
ClutterBindingEntry remove_entry = { 0, };
|
||||
GSList *l;
|
||||
|
||||
g_return_if_fail (pool != NULL);
|
||||
g_return_if_fail (key_val != 0);
|
||||
@ -659,6 +660,18 @@ clutter_binding_pool_remove_action (ClutterBindingPool *pool,
|
||||
remove_entry.key_val = key_val;
|
||||
remove_entry.modifiers = modifiers;
|
||||
|
||||
for (l = pool->entries; l != NULL; l = l->data)
|
||||
{
|
||||
ClutterBindingEntry *e = l->data;
|
||||
|
||||
if (e->key_val == remove_entry.key_val &&
|
||||
e->modifiers == remove_entry.modifiers)
|
||||
{
|
||||
pool->entries = g_slist_remove_link (pool->entries, l);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_hash_table_remove (pool->entries_hash, &remove_entry);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user