GNU bug report logs - #49997
27.2; idle-time reset when switching desktop-page

Previous Next

Package: emacs;

Reported by: Peter Münster <pm <at> a16n.net>

Date: Wed, 11 Aug 2021 08:44:01 UTC

Severity: normal

Tags: confirmed, moreinfo

Found in version 27.2

Fixed in version 29.1

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 49997 <at> debbugs.gnu.org, pm <at> a16n.net
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
Date: Sun, 15 Aug 2021 20:39:30 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 49997 <at> debbugs.gnu.org,  pm <at> a16n.net
> Date: Sun, 15 Aug 2021 19:12:55 +0200
> 
> Well, it does definitely lose focus when we switch to a different
> desktop, so I think the events themselves are correct (more or less).

If we get a focus-out event for a frame that was already in
"focus-out" state, we could detect that and do nothing.  This would
correspond to the situation where the user already moved focus from
Emacs (i.e. was working in some other application's window), and
switched to a different page -- in such a situation I could indeed
understand why the user didn't expect the idleness to end.

But if the user had focus in an Emacs frame, and switched pages, then
the focus-out event indeed counts, and the user cannot expect the
idleness to continue.

> I guess the concept of "Emacs is idle" isn't well-defined.  I think a
> natural interpretation of the it is "I haven't done anything in Emacs".

No, it means no input events came in.  Emacs cannot know whether the
user does anything, it can only know what events come its way.

> And giving focus to Emacs isn't "in Emacs", in a way.  So we could bar
> FOCUS_IN/FOCUS_OUT from changing idleness in general.
> 
> On the other hand, getting/losing focus is a thing that happens to
> Emacs, so it's not really "idle".
> 
> I dunno.  Perhaps we should just leave it as is.

Can we please see if this also happens when the frame is already in a
focus-out state?  We could perhaps ignore such events.  Otherwise, I
tend to agree that there's not much we could do here.




This bug report was last modified 3 years and 225 days ago.

Previous Next


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