Do not disable extensions on suspend
The default gnome-shell behaviour is to call disable()
on every extensions when going to sleep, and re-enable them when the computer is awakened from sleep.
Although this is probably to make sure that no extension mess around by trying to execute code during sleep, this behaviour is (IMHO) not the best for these reasons:
- some cpu time is spent just before and after going to sleep, making the "open laptop and everything works" experience a little more laggy
- the shell may not behave/look the same before and after going to sleep, which is unfortunate for extensions which (for example) randomly choose a wallpaper at startup, or which require to have the same state during the entire gnome session
- there is currently no way to tweak the lockscreen: although changing the lockscreen widgets is possible, all the changes are lost when the computer goes to sleep (except if the extension does not really disable itself, which is not at all accepted)
The third point is actually the reason why I open this, as my extension Blur my Shell can't blur the lockscreen after going to sleep, although it works well after locking the screen. See https://github.com/aunetx/blur-my-shell/issues/91 for more details.
In my opinion, the best thing would be to either simply "freeze" the entire gnome state, so that the user finds the exact same desktop after sleep, or to permit extensions devs to not entirely disable their extension when disable()
is called, if and only if it is called because the computer is going to sleep (and not logout, shutdown or shell restart).
For this, a simple boolean variable to check would be perfect, permitting the extension devs to check a single condition when disabling, and making the extensions review as easy as before -- because it would be the only accepted condition not to disable the extension entirely
I hope that this is not a duplicate, and with all my respect
Aurélien Hamy