Subject: bug#6719: Issues with Windows hibernation

From: Eli Zaretskii <[email-masked]>
Date: Wed, 02 Oct 2019 17:53:02 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Tue, 01 Oct 2019 21:34:04 +0200
> Cc: [email-masked]
> 
> Esa Peuha <[email-masked]> writes:
> 
> > If Windows XP is hibernated while Emacs 23.2 is running, Emacs gets
> > the <sleep> event which by default is undefined, so Emacs beeps before
> > hibernation and displays "<sleep> is undefined" after Windows is
> > resumed; I think <sleep> should be ignored by default.
> 
> (I'm going through old bug reports that unfortunately didn't get any
> response at the time.)
> 
> This seems like a reasonable thing to add to global-map (i.e., ignoring
> [sleep]), but is it common for Windows to send a [sleep] keystroke to
> apps before hibernating?

I don't know, FWIW, and couldn't see where we any w32 code to inject
that event when the system is about to hibernate.  Maybe I'm missing
something.