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


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: pm <at> a16n.net, rudalics <at> gmx.at, 49997 <at> debbugs.gnu.org
Subject: bug#49997: 27.2; idle-time reset when switching desktop-page
Date: Sun, 15 Aug 2021 18:17:06 +0200
I think I was looking at the wrong thing -- I was looking at the
idle_start stuff, but it's the idle_stop stuff that's important.  (An
idle_start when we're already idle doesn't change anything.)

And the idle_stops that happen when I change back to the virtual desktop
comes from here:

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.

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

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





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.