GNU bug report logs - #6719
[w32] Hibernate sends undefined <sleep> key & shrinks maximized windows

Previous Next

Package: emacs;

Reported by: Esa Peuha <esa.peuha <at> gmail.com>

Date: Sat, 24 Jul 2010 16:53:01 UTC

Severity: minor

Found in version 23.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6719 in the body.
You can then email your comments to 6719 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Sat, 24 Jul 2010 16:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Esa Peuha <esa.peuha <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 24 Jul 2010 16:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Esa Peuha <esa.peuha <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Issues with Windows hibernation
Date: Sat, 24 Jul 2010 19:52:05 +0300
[Message part 1 (text/plain, inline)]
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. Also, if the
Emacs window was maximized before hibernation, it isn't restored to
quite as it was; its size is reduced slightly and it's surrounded by
the usual window border.
[Message part 2 (text/html, inline)]

Severity set to 'minor' from 'normal' Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 01 Feb 2017 02:55:02 GMT) Full text and rfc822 format available.

Changed bug title to '[w32] Hibernate sends undefined <sleep> key & shrinks maximized windows' from 'Issues with Windows hibernation' Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 01 Feb 2017 02:55:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 23.2. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Wed, 01 Feb 2017 02:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Tue, 01 Oct 2019 19:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Esa Peuha <esa.peuha <at> gmail.com>
Cc: 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Tue, 01 Oct 2019 21:34:04 +0200
Esa Peuha <esa.peuha <at> gmail.com> 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?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Wed, 02 Oct 2019 14:54:02 GMT) Full text and rfc822 format available.

Message #17 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Wed, 02 Oct 2019 17:53:02 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Tue, 01 Oct 2019 21:34:04 +0200
> Cc: 6719 <at> debbugs.gnu.org
> 
> Esa Peuha <esa.peuha <at> gmail.com> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Thu, 03 Oct 2019 14:27:01 GMT) Full text and rfc822 format available.

Message #20 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Thu, 03 Oct 2019 16:26:26 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> 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.

Is it possible that the OS just sends a [sleep] event to all clients
when it's about to hibernate?  It would be a pretty simple interface for
notifying apps instead of using signals or a message bus...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Thu, 03 Oct 2019 16:47:02 GMT) Full text and rfc822 format available.

Message #23 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Thu, 03 Oct 2019 19:46:10 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: esa.peuha <at> gmail.com,  6719 <at> debbugs.gnu.org
> Date: Thu, 03 Oct 2019 16:26:26 +0200
> 
> > 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.
> 
> Is it possible that the OS just sends a [sleep] event to all clients
> when it's about to hibernate?

Maybe, I just don't know.  AFAIK, the message sent in that case is not
processed by Emacs to generate a 'sleep' function key, we only
generate that when the actual "sleep" key on the keyboard is pressed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Thu, 03 Oct 2019 17:13:01 GMT) Full text and rfc822 format available.

Message #26 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Thu, 03 Oct 2019 19:12:18 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Maybe, I just don't know.  AFAIK, the message sent in that case is not
> processed by Emacs to generate a 'sleep' function key, we only
> generate that when the actual "sleep" key on the keyboard is pressed.

On GNU/Linux, it's easy enough to inject events into the event queue of
a process that's indistinguishable from an actual keyboard event, so I
was assuming that Windows also had such a thing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Thu, 03 Oct 2019 17:32:01 GMT) Full text and rfc822 format available.

Message #29 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Thu, 03 Oct 2019 20:30:59 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: esa.peuha <at> gmail.com,  6719 <at> debbugs.gnu.org
> Date: Thu, 03 Oct 2019 19:12:18 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Maybe, I just don't know.  AFAIK, the message sent in that case is not
> > processed by Emacs to generate a 'sleep' function key, we only
> > generate that when the actual "sleep" key on the keyboard is pressed.
> 
> On GNU/Linux, it's easy enough to inject events into the event queue of
> a process that's indistinguishable from an actual keyboard event, so I
> was assuming that Windows also had such a thing.

It does.  It's just that I don't see that particular message handled
anywhere in our sources which handle various Windows messages, so I
wonder how did the OP get the 'sleep' function key in the first place.
Maybe he just pressed the Sleep key...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Mon, 07 Oct 2019 03:31:01 GMT) Full text and rfc822 format available.

Message #32 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Mon, 07 Oct 2019 05:30:54 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> It does.  It's just that I don't see that particular message handled
> anywhere in our sources which handle various Windows messages, so I
> wonder how did the OP get the 'sleep' function key in the first place.
> Maybe he just pressed the Sleep key...

It's possible.

Does anybody here have access to a Windows laptop that goes to sleep
when you close the lid?  Could you try to do that and see whether Emacs
gets a [sleep] event that it then complains about?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Mon, 07 Oct 2019 05:06:01 GMT) Full text and rfc822 format available.

Message #35 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Nordin <tomasn <at> posteo.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Mon, 07 Oct 2019 07:04:54 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> It does.  It's just that I don't see that particular message handled
>> anywhere in our sources which handle various Windows messages, so I
>> wonder how did the OP get the 'sleep' function key in the first place.
>> Maybe he just pressed the Sleep key...
>
> It's possible.
>
> Does anybody here have access to a Windows laptop that goes to sleep
> when you close the lid?  Could you try to do that and see whether Emacs
> gets a [sleep] event that it then complains about?

I do at work, what must I do? What should I inspect when coming back
from sleep?

Best regards
--
Tomas

>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Mon, 07 Oct 2019 05:07:02 GMT) Full text and rfc822 format available.

Message #38 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tomas Nordin <tomasn <at> posteo.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Mon, 07 Oct 2019 07:06:21 +0200
Tomas Nordin <tomasn <at> posteo.net> writes:

> I do at work, what must I do? What should I inspect when coming back
> from sleep?

The bug report states that Emacs says

"<sleep> is undefined"

when the lid is opened (and Windows has resumed from sleep).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Mon, 07 Oct 2019 08:58:01 GMT) Full text and rfc822 format available.

Message #41 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Nordin <tomasn <at> posteo.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Mon, 07 Oct 2019 10:57:27 +0200
On 07.10.2019 07:06, Lars Ingebrigtsen wrote:
> Tomas Nordin <tomasn <at> posteo.net> writes:
> 
>> I do at work, what must I do? What should I inspect when coming back
>> from sleep?
> 
> The bug report states that Emacs says
> 
> "<sleep> is undefined"
> 
> when the lid is opened (and Windows has resumed from sleep).

Had my normal Emacs running and started one emacs -Q. Closed the lid for 
a while to go to sleep. When back I
could not see anything about sleep in the instances. I checked the 
messages (`view-echo-area-messages`).

Here is some info from the emacs -Q instance:

In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
 of 2019-04-13 built on CIRROCUMULUS
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Mon, 07 Oct 2019 12:14:01 GMT) Full text and rfc822 format available.

Message #44 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Tomas Nordin <tomasn <at> posteo.net>, esa.peuha <at> gmail.com,
 Eli Zaretskii <eliz <at> gnu.org>, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Mon, 07 Oct 2019 08:13:04 -0400
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> The bug report states that Emacs says
>
> "<sleep> is undefined"
>
> when the lid is opened (and Windows has resumed from sleep).

The OP says nothing about a lid.  (And I wouldn't expect opening a lid
to wake up from hibernate, though maybe it's possible to configure
things that way)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6719; Package emacs. (Tue, 08 Oct 2019 16:40:02 GMT) Full text and rfc822 format available.

Message #47 received at 6719 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tomas Nordin <tomasn <at> posteo.net>
Cc: esa.peuha <at> gmail.com, 6719 <at> debbugs.gnu.org
Subject: Re: bug#6719: Issues with Windows hibernation
Date: Tue, 08 Oct 2019 18:39:46 +0200
Tomas Nordin <tomasn <at> posteo.net> writes:

> Had my normal Emacs running and started one emacs -Q. Closed the lid
> for a while to go to sleep. When back I
> could not see anything about sleep in the instances. I checked the
> messages (`view-echo-area-messages`).

Thanks for checking.  Since this problem seems unreproducible, perhaps
it was just something Windows did in one particular old version?  So I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 6719 <at> debbugs.gnu.org and Esa Peuha <esa.peuha <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 08 Oct 2019 16:41:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Nov 2019 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.