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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 11 Aug 2021 15:00:07 +0300

> From: Peter Münster <[email-masked]>
> Date: Wed, 11 Aug 2021 10:42:57 +0200
> 
> Surprised about functions never executing, that I start with
> gnus-demon-add-handler and some idle-time, I've checked the idle time of
> emacs this way:
> 
> while sleep 1; do emacsclient -e '(current-idle-time)'; done
> 
> This test has revealed, that the idle time is reset to 0, whenever I
> switch a desktop-page. I use FvwmPager with 3x3 pages. Emacs is on page
> 2-2 and even when emacs is not affected by the page-change (for example
> from 1-1 to 1-2), the idle time is reset.
> 
> How could I avoid such reset please?

Does Emacs receive some event from the window-system when you switch
the desktop-page?  If it does, that's what explains the reset of the
idle time.

To see what can be done, I think we'd need to know whether indeed
Emacs receives an event, and what kind of event is that.