Subject: bug#49997: 27.2; idle-time reset when switching desktop-page

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 15 Aug 2021 19:12:55 +0200

Eli Zaretskii <[email-masked]> writes:

>> And if it does present a problem, cannot the OP use
>> after-focus-change-function to restart the idleness?
>
> Or maybe configure the WM not to send focus-out events for a page
> switch?

Well, it does definitely lose focus when we switch to a different
desktop, so I think the events themselves are correct (more or less).

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

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