multi-choice: Fix endless timeout
There are two mapped events for each back/forward buttons in this widget: button-press and button-release. When you reach the limits like January and December, button-release is lost, and you don't get it anymore. That caused button_timeout function to not be disable anymore, so it's kept in loop forever. This code fix checks in button_timeout function if any of the back/ forward buttons are still mapped. If not, it prevents from calling button_timout, stopping the loop. https://bugzilla.gnome.org/show_bug.cgi?id=776459
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
e69c9aa09c
commit
0bf0c9e7cf
@@ -187,6 +187,15 @@ button_timeout (gpointer user_data)
|
||||
if (self->click_id == 0)
|
||||
return G_SOURCE_REMOVE;
|
||||
|
||||
if (!gtk_widget_get_mapped (self->down_button) && !gtk_widget_get_mapped (self->up_button))
|
||||
{
|
||||
if (self->click_id)
|
||||
g_source_remove (self->click_id);
|
||||
self->click_id = 0;
|
||||
self->active = NULL;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
res = button_activate (self, self->active);
|
||||
if (!res)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user