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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 06 Feb 2025 10:26:01 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Wed, 05 Feb 2025 17:37:20 -0500
> 
> >> Maybe a hook is not such a bad idea after all.
> > But then how would platforms where these events come from the
> > window-system call that hook?
> 
> I don't understand the question:

It seems you understood it well enough to answer it ;-)

>                                  why would those not be ale to run the
> hook?  If it's because it's in a separate UI thread, they can push to
> `pending_funcalls`, or in the worst case they can add an event into the
> event queue and then use `special-event-map` to run an ad-hoc function
> which runs the hook.
> 
> Of course, we could similarly make the D-bus code manually do
> (lookup-key special-event-map [sleep-event])

Thanks, so which of these solutions would you recommend as the
cleanest and the most convenient/extensible one?

Michael, do you have any opinions or comments about these
possibilities, from the D-Bus support POV?