Extension's `disable()` not called when shutting down
Affected version
- Your OS and version
- Ubuntu 22.04
- Affected GNOME Shell version (see https://wiki.gnome.org/Schedule for currently supported versions)
- 42
- Does this issue appear in XOrg and/or Wayland
- I've only tested XOrg but I can test Wayland if need be
Bug summary
I've noticed if I lock the screen or log out, the extension's disable()
function is called. But if I shut down the PC, disable()
is never called. Is this a bug or intentional behaviour?
I had trouble searching for this issue so I only have a couple other data points from here: https://stackoverflow.com/questions/15614120/gnome-shell-extension-destructor-run-on-gnome-shell-exit
- In 2013 a user said that
disable()
should be called when the shell shuts down or restarts - In 2020 someone else noticed the same behaviour I'm reporting here
I'm also not sure where to find official documentation. The closest thing I could find were comments in some code examples:
* This function is called when your extension is uninstalled, disabled in * GNOME Extensions, when you log out or when the screen locks.
(https://gjs.guide/extensions/overview/anatomy.html#extension-js-required)
Thanks!
Steps to reproduce
- Install and enable an extension that has some kind of traceable behaviour in
disable()
- Shut down the PC by choosing Power Off from within Gnome
What happened
disable()
is never called
What did you expect to happen
I would expect disable()
to be called since it's called in other similar situations, such as when logging out