Cardapio window enters open/close loop when using gnome3 applet

Bug #1622277 reported by Gabriel Finkelstein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cardapio
New
Undecided
Unassigned

Bug Description

When using the gnome3 applet in gnome-panel, on gnome-flashback (Ubuntu) 16.04:

1. Open Cardapio by clicking on the applet
2. Close Cardapio by focusing on a different window or on the desktop

Expected result:
Cardapio window should close

Actual result:
Cardapio window closes, then opens again, then closes again, then opens again, etc.

This happens because there's a listener for the "clicked" event on the GtkToggleButton, which toggles the window, but there's also a listener on "on_menu_visibility_changed", which toggles the state of the GtkToggleButton. And apparently toggling the state of the button triggers another "clicked" event, and so we are caught in a loop.

Possible fix: disable the event listener before changing the button state, and reenable it afterwards. Attached is a patch that does this.

Revision history for this message
Gabriel Finkelstein (gabrielfinkelstein) wrote :
Revision history for this message
Eugene San (eugenesan) wrote :

@gabrielfinkelstein
Thanks for the patch, it was successfully merged:
https://git.launchpad.net/cardapio/commit/?id=09073d2fa65627a2f4f33683d515c1ee7c7a727e

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.