[Solved] execute a function when closing a tool window??

I use “renoise.app():show_custom_dialog” for a window tool. This window has a X to “close window”. Is it possible to execute a function by pressing this “X”?

I want to stop a timer when I close the window.Actually, this window (secondary window) is invoked from another tool window (principal window).

Thanks for the help!

The only way to do this, currently, is to use an idle notifier and check the property “visible” of the dialog object.

(This, or the even uglier solution of using a modal dialog and your very own custom close button.)

Thanks Joule! Ok, I will use a notifier to check dialog.visible.I do not really like using a notifier to close a timer.It would be great to be able to execute a function when closing a window, since it requires an action (press a button or command).

I already have a custom button that opens and closes the window. There is no problem here. I miss being able to control the top bar of the tool window, the title, the X button …