Skip to content

panel: Disconnect destroy signal handler when needed

Ray Strode requested to merge wip/fix-panel-destroy-handler-leak into master

The panel corners try to match their style to the buttons closest to them. In order to make sure the corner styles stay in sync with their neighboring buttons, they connect to the style-changed signals of the buttons.

In order to make sure the style-changed signal handler isn't leaked, it gets disconnected when the button is destroyed.

Unfortunately, the destroy signal handler connection itself gets leaked!

This commit ensures the destroy signal handler gets disconnected any time the neighboring button is re-determined.

Merge request reports