mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
clutter/click-action: Make sure to never schedule more than one timeout
click_action_query_long_press() can potentially schedule more than one timeout, since it doesn't clear any already-existing timeout. Make sure to clear the long press timeout before scheduling a new one. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1188
This commit is contained in:
parent
633d5d1b84
commit
676997e0af
@ -238,6 +238,7 @@ click_action_query_long_press (ClutterClickAction *action)
|
|||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
|
g_clear_handle_id (&priv->long_press_id, g_source_remove);
|
||||||
priv->long_press_id =
|
priv->long_press_id =
|
||||||
clutter_threads_add_timeout (timeout,
|
clutter_threads_add_timeout (timeout,
|
||||||
click_action_emit_long_press,
|
click_action_emit_long_press,
|
||||||
|
Loading…
Reference in New Issue
Block a user