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 #34 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: pm <at> a16n.net, rudalics <at> gmx.at, 49997 <at> debbugs.gnu.org
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
Date: Sun, 15 Aug 2021 19:46:52 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: pm <at> a16n.net,  49997 <at> debbugs.gnu.org,  rudalics <at> gmx.at
> Date: Sun, 15 Aug 2021 18:17:06 +0200
> 
> static void
> x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct frame *frame, struct input_event *bufp)
> {
>   if (type == FocusIn)
>     {
>       if (dpyinfo->x_focus_event_frame != frame)
>         {
>           x_new_focus_frame (dpyinfo, frame);
>           dpyinfo->x_focus_event_frame = frame;
>           bufp->kind = FOCUS_IN_EVENT;
>           XSETFRAME (bufp->frame_or_window, frame);
>         }
> 
>       frame->output_data.x->focus_state |= state;
> [...]
>   else if (type == FocusOut)
>     {
>       frame->output_data.x->focus_state &= ~state;
> 
> So we lose focus and then get it back, and that makes Emacs unidle.

If we get focus in/out events when the user changes the page, then
it's the correct behavior.

> Which is arguably correct behaviour, but I can see the case for changing
> that.  I mean, the user hasn't done anything inside Emacs.

The user switched off the Emacs frame, which is something, not
nothing.

Why exactly does the stop of idleness present a problem in this case?
And if it does present a problem, cannot the OP use
after-focus-change-function to restart the idleness?




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.