Subject: bug#63620: 30.0.50; [Feature Request] run hooks on sleep/wake

From: Andrew Cohen <[email-masked]>
Date: Thu, 06 Feb 2025 10:20:44 +0800

>>>>> "SM" == Ship Mints <[email-masked]> writes:

    SM> If someone builds without dbus, say on macOS, does this approach
    SM> work without dbus?

This assumes that detection of sleep/wake state changes will be added to
the C source (as you offered to implement for NS :)). The idea is that
you add code to detect the change at the OS level, and then create an
event of type sleep-event with an argument of t for sleep and nil for
wake.  The lisp package detects the sleep-event and runs the appropriate
code.

It won't work quite yet (this was just showing the concept) since the C
code has to be written, and the handler function needs to accept either
an event (a cons) or a boolean. But if everyone thinks this is a valid
approach we can take care of this.

Best,
Andy
-- 
Andrew Cohen