Sublime Forum

Capturing Window Close Events

#1

Hey, I noticed that my plugin doesn’t get the “close_window” event if it is closed by the window manager (X on upper right). Is this normal?

The idea behind the plugin is to add a dialog box if you accidentally try and close Sublime Text, as I do this all the time with my current monitor setup. Right now there isn’t an option to add a close dialog box on shutdown, I’m hoping to fix that.

The plugin does get the event if I go through the menu, but I’m hoping to do the window close check every time a window is closed, no matter the method. Is this possible? I’m not messing up the event capture portion of the code am I?

Plugin link.

0 Likes

#2

For now… this is just “normal”, work in progress…

0 Likes

#3

Edit: sorry. You said window close, not tab close.

0 Likes

#4

Right on, I figured this was the case. Is there an issue or feature tracker that I can follow for this? If there isn’t, its not a big deal.

0 Likes

#5

Fill or search for the bug github.com/SublimeText/Issues/issues

0 Likes