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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Peter Münster <pm@HIDDEN>; Keywords: confirmed; dated Wed, 11 Aug 2021 08:44:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 22 Aug 2021 21:41:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 17:41:42 2021
Received: from localhost ([127.0.0.1]:39902 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHvDm-0005Dd-H8
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 17:41:42 -0400
Received: from quimby.gnus.org ([95.216.78.240]:37244)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mHvDg-0005DI-Vp
 for 49997 <at> debbugs.gnu.org; Sun, 22 Aug 2021 17:41:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=x31qCasgVFVozGx4X4ANPNliWQlN3r/BH7igiZO7ye0=; b=OXaD/shP6nUChMmjMtgiAu1NWX
 hspql1Dzyh9K8C3UmxQO0Jlm5uM19XG5QtPbukagbPX978UPB5W0yVXTzpR4ia1YG/RdtgJnr8Jj1
 IxdjXYqlEWG7jN3bnGG5w9tOKdG7z/1P2vtnFiZBQJ5Ty8xG/2DLp3WY+cS6Q860+KX8=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mHvDW-0003JQ-I5; Sun, 22 Aug 2021 23:41:26 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN>
 <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN>
 <87czqbi03a.fsf@HIDDEN> <83czqb56i2.fsf@HIDDEN>
 <09998a72-76dc-42a6-dc15-612cbc942863@HIDDEN> <83eeao1jmt.fsf@HIDDEN>
 <e94b11f4-722c-2b16-ee9d-5fcbc2763186@HIDDEN> <838s0tygbi.fsf@HIDDEN>
Date: Sun, 22 Aug 2021 23:41:21 +0200
In-Reply-To: <838s0tygbi.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 22 Aug
 2021 12:33:21 +0300")
Message-ID: <87o89pw41q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Eli Zaretskii <eliz@HIDDEN> writes: >> Not sure whether the
 attached is what you meant - it's just a first stab >> in that direction.
 > > Something like that, yes. Looks good to me, too. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, martin rudalics <rudalics@HIDDEN>, pm@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Not sure whether the attached is what you meant - it's just a first stab
>> in that direction.
>
> Something like that, yes.

Looks good to me, too.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 22 Aug 2021 09:33:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 05:33:39 2021
Received: from localhost ([127.0.0.1]:38181 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHjrH-0001gf-AY
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 05:33:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55166)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mHjrF-0001gS-OW
 for 49997 <at> debbugs.gnu.org; Sun, 22 Aug 2021 05:33:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43626)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mHjr9-0005K7-Jo; Sun, 22 Aug 2021 05:33:31 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3940
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mHjr8-0001mQ-JK; Sun, 22 Aug 2021 05:33:31 -0400
Date: Sun, 22 Aug 2021 12:33:21 +0300
Message-Id: <838s0tygbi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <e94b11f4-722c-2b16-ee9d-5fcbc2763186@HIDDEN> (message from
 martin rudalics on Sun, 22 Aug 2021 10:24:15 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN> <87a6likc5a.fsf@HIDDEN>
 <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN> <87czqbi03a.fsf@HIDDEN>
 <83czqb56i2.fsf@HIDDEN> <09998a72-76dc-42a6-dc15-612cbc942863@HIDDEN>
 <83eeao1jmt.fsf@HIDDEN> <e94b11f4-722c-2b16-ee9d-5fcbc2763186@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, larsi@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: pm@HIDDEN, larsi@HIDDEN, 49997 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sun, 22 Aug 2021 10:24:15 +0200
> 
>  > If we end up with a list of ignored events, as I think we should, we
>  > should consider making the same list control all of the relevant
>  > features.
> 
> Not sure whether the attached is what you meant - it's just a first stab
> in that direction.

Something like that, yes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 22 Aug 2021 08:24:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 04:24:24 2021
Received: from localhost ([127.0.0.1]:38140 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHimF-0008Tv-VD
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 04:24:24 -0400
Received: from mout.gmx.net ([212.227.15.19]:43263)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1mHimE-0008Ti-3u
 for 49997 <at> debbugs.gnu.org; Sun, 22 Aug 2021 04:24:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1629620656;
 bh=OGoziEWFPDDEqm01iGEOmCGCERVpAsFjwJ9Rf4ET+p8=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=Gm4P41j5M54m2uyfOkMgfi2Z8oUyWp4z5nPpKhTZ2bwlYrMimRSSpF9sTblK7/j/7
 OjtDDcBNxa8gcjby1nJhHuRTczSyJkzAQE/KOUdB96Q/TcSe84W8TKkPCOV4AwEfY/
 VF4yiuWnRNyKgbGcmb01SmI/3NOmU6p2X39z1eeo=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.239]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MnJhO-1mjOY006Mu-00jG2t; Sun, 22
 Aug 2021 10:24:16 +0200
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
To: Eli Zaretskii <eliz@HIDDEN>
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN> <87a6likc5a.fsf@HIDDEN>
 <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN> <87czqbi03a.fsf@HIDDEN>
 <83czqb56i2.fsf@HIDDEN> <09998a72-76dc-42a6-dc15-612cbc942863@HIDDEN>
 <83eeao1jmt.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <e94b11f4-722c-2b16-ee9d-5fcbc2763186@HIDDEN>
Date: Sun, 22 Aug 2021 10:24:15 +0200
MIME-Version: 1.0
In-Reply-To: <83eeao1jmt.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------CD7CF5F8967B50D8C17B1417"
Content-Language: en-US
X-Provags-ID: V03:K1:bCc2yZvVKcntsieTyHvD7jWaZtln/Jl1xNvA4L+2lSX1H2vGMRx
 ScKBdBSrJokZaIUt+Czc2eM5ylJzCm4okFliHE8+mJnvTdqtF9FHDAoxo8REZEZf0NwXLxZ
 OVsczB+BT/EgoX2SMFpE8E3HWp29PQgbWsRez48l9A6zL7Ek2E7ekGtUheVNzyX0ykxYALj
 p+2DA/UPU7/Kwvatr74Gg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:94FIt/WCefg=:GDQdLdgi2bGUkxq/ZRtKWm
 ufXHtgSHVpHnylXk2nTfZt4ZGixPvhmIGkUfSf0TRCgVcBHL8VS96ZazeCvnoSAwCipQyORhv
 f1qPV4ty3YmAEWl9R5uAPZNMzJF4zgd0ZE7TVj2wgkmYH62aYnqkcoywb5E3eca59kBMGdg7f
 biE3WuBeo7sJC63UT7b3wkhr9RZEA0Q2rrFabr2cLSqKxN05AotLIkLDqX71h0/u/AV4erfXO
 rNFXWRhVvL1rlxrE9PdEwOxJKJ9pDtDM6kgcmSPO2WxVOJpvNjBapHcn+wU36AjwCd11JkUNo
 skYugaKe9TD1iF2Fd6UGOPHr1YsGRmil68+wLKWmIQ9lQ5u55o6RKDepiqZokMtL3ehNoIMCU
 DRMxebx5yJRBi7C6o6VEJKe1NVlcCk+XMSFhR4SweRQvPT840XoJ029kQQN3zdOojSYluhnpF
 SSUYcigiOrI3kp0g5iqnQUvdGsYw6UF1JXBkvkrf/7xaSZWmR2qqlpQIF1o/8TLgYGA7SDise
 q/bLOG2e7MfXQVlkHhQ8/PxTVQ7RadkkeLNOAn/chKoWnxFe1tSelAwPoK0xsJRwQoQUThLxS
 XdEue5E/Ft4JA2KEpjgi9PKCgOxdHf/KHEwxGbmmolneQPUowictEZ/zm9YfP4yrCU6Ye4YHO
 zGnEgZLhGPNy89sUHud9HIjwk3g0hwWyjWLmMHcHJsG6z89wDp+I6RkZhn7EtA9FF5dBRxWX+
 CU91sFRlVCCkgDeYEPfyBXGym3X/4GwyngUmON6zU+qNfZIGlPpUHSH+UB9mpx0nPFzFdrPjT
 1Y9kgSW28ath8y9lrV1+x1Zhzh/vKJsmtHdSn0ONklqBnHzJdTok3RYJmgf8BhbE6MYiLkSOz
 XqUU4GYeACTCzAa4VufiqOT8tzGq3Xo/8f6lfGIb2SVUoxsUSsDLJEqSvI308arzKplwQtRR8
 loVH/XvblF37cFk/CCWFrkqiPMzqNlnxEuwyd1J2VV4BpH5wdEffi/6hhjh/uV1sTjxoowQu3
 1fAZSs+efoOuFjpto57hoRD+Cyn/7giQt7BLbajRV+kvFcYsIbZgGCC4q80cSSfPK7W6Q52wn
 ilWLqztP0AmoRH7mVbXSxv8enIwLw7jnK5PKLaSiT+8Bve5bu+cokRY5A==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, larsi@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------CD7CF5F8967B50D8C17B1417
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

 > If we end up with a list of ignored events, as I think we should, we
 > should consider making the same list control all of the relevant
 > features.

Not sure whether the attached is what you meant - it's just a first stab
in that direction.

martin

--------------CD7CF5F8967B50D8C17B1417
Content-Type: text/x-patch;
 name="while-no-input-ignore-events.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="while-no-input-ignore-events.diff"

diff --git a/lisp/subr.el b/lisp/subr.el
index 0a31ef2b29..f100259e9e 100644
=2D-- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4350,11 +4350,6 @@ with-local-quit
 	   ;; that intends to handle the quit signal next time.
 	   (eval '(ignore nil)))))

-;; Don't throw `throw-on-input' on those events by default.
-(setq while-no-input-ignore-events
-      '(focus-in focus-out help-echo iconify-frame
-        make-frame-visible selection-request))
-
 (defmacro while-no-input (&rest body)
   "Execute BODY only as long as there's no pending input.
 If input arrives, that ends the execution of BODY,
diff --git a/src/keyboard.c b/src/keyboard.c
index 2e4c4e6aab..48b9904d85 100644
=2D-- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2927,20 +2927,8 @@ read_char (int commandflag, Lisp_Object map,
       last_input_event =3D c;
       call4 (Qcommand_execute, tem, Qnil, Fvector (1, &last_input_event),=
 Qt);

-      if (CONSP (c)
-          && (EQ (XCAR (c), Qselect_window)
-              || EQ (XCAR (c), Qfocus_out)
-#ifdef HAVE_DBUS
-	      || EQ (XCAR (c), Qdbus_event)
-#endif
-#ifdef USE_FILE_NOTIFY
-	      || EQ (XCAR (c), Qfile_notify)
-#endif
-#ifdef THREADS_ENABLED
-	      || EQ (XCAR (c), Qthread_event)
-#endif
-	      || EQ (XCAR (c), Qconfig_changed_event))
-          && !end_time)
+      if (CONSP (c) && !NILP (Fmemq (XCAR (c), Vwhile_no_input_ignore_eve=
nts))
+	  && !end_time)
 	/* We stopped being idle for this event; undo that.  This
 	   prevents automatic window selection (under
 	   mouse-autoselect-window) from acting as a real input event, for
@@ -11550,6 +11538,27 @@ init_keyboard (void)
   {SYMBOL_INDEX (Qselect_window),       SYMBOL_INDEX (Qswitch_frame)}
 };

+static Lisp_Object
+init_while_no_input_ignore_events (void)
+{
+  Lisp_Object events =3D listn (9, Qselect_window, Qhelp_echo, Qmove_fram=
e,
+			      Qiconify_frame, Qmake_frame_visible,
+			      Qfocus_in, Qfocus_out, Qconfig_changed_event,
+			      Qselection_request);
+
+#ifdef HAVE_DBUS
+  events =3D Fcons (Qdbus_event, events);
+#endif
+#ifdef USE_FILE_NOTIFY
+  events =3D Fcons (Qfile_notify, events);
+#endif
+#ifdef THREADS_ENABLED
+  events =3D Fcons (Qthread_event, events);
+#endif
+
+  return events;
+}
+
 static void syms_of_keyboard_for_pdumper (void);

 void
@@ -12444,7 +12453,12 @@ syms_of_keyboard (void)

   DEFVAR_LISP ("while-no-input-ignore-events",
                Vwhile_no_input_ignore_events,
-               doc: /* Ignored events from while-no-input.  */);
+               doc: /* Ignored events from while-no-input.
+Events in this list do not count as pending input while running
+`while-no-input' and do not cause any idle timers to get reset when they
+occur.  */);
+
+  Vwhile_no_input_ignore_events =3D init_while_no_input_ignore_events ();

   pdumper_do_now_and_after_load (syms_of_keyboard_for_pdumper);
 }

--------------CD7CF5F8967B50D8C17B1417--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 20 Aug 2021 10:44:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 06:44:05 2021
Received: from localhost ([127.0.0.1]:33018 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH20K-0003Qw-R7
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 06:44:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60854)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mH20J-0003QL-EO
 for 49997 <at> debbugs.gnu.org; Fri, 20 Aug 2021 06:44:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38224)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mH20C-0000EC-MK; Fri, 20 Aug 2021 06:43:56 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1164
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mH20C-0001gz-8w; Fri, 20 Aug 2021 06:43:56 -0400
Date: Fri, 20 Aug 2021 13:43:38 +0300
Message-Id: <83eeao1jmt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <09998a72-76dc-42a6-dc15-612cbc942863@HIDDEN> (message from
 martin rudalics on Fri, 20 Aug 2021 10:19:06 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN> <87a6likc5a.fsf@HIDDEN>
 <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN> <87czqbi03a.fsf@HIDDEN>
 <83czqb56i2.fsf@HIDDEN> <09998a72-76dc-42a6-dc15-612cbc942863@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, larsi@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: larsi@HIDDEN, 49997 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Fri, 20 Aug 2021 10:19:06 +0200
> 
>  > Btw, idleness is not the only feature related to this gray area:
>  > there's also while-no-input, input-pending-p, and throw-on-input, to
>  > mention a few.  Should these be in sync?
> 
> Here we have
> 
> (setq while-no-input-ignore-events
>        '(focus-in focus-out help-echo iconify-frame
>          make-frame-visible selection-request))
> 
> so this set and the above are certainly not "in sync".
> 
> But I have no idea how these two sets are supposed to interact and
> whether and how they should be presented to users.

If we end up with a list of ignored events, as I think we should, we
should consider making the same list control all of the relevant
features.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 20 Aug 2021 08:19:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 04:19:31 2021
Received: from localhost ([127.0.0.1]:32934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGzkR-0007wB-3N
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 04:19:31 -0400
Received: from mout.gmx.net ([212.227.15.18]:37055)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1mGzkA-0007vj-Fp
 for 49997 <at> debbugs.gnu.org; Fri, 20 Aug 2021 04:19:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1629447547;
 bh=YAForaoMykHvcuT/RkxilIk2xaOGiv7A+URVt+Hl2KI=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=GoZ62hKE0+S4kqcKxl+X0MtN/Hlhc3CmV0aJatfwL97ReMSO4PFA8OUfHQVgd+wo9
 CXxzmrT0Szr7RDbtcluF4a1SexXOTYN8ku81J71YcgduFMJAHdl6w+HaYEEV/NCteu
 D9LgezuqDRtAJbqLoxaal3E6efqvJrIhiogCDUq4=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.102] ([212.95.5.218]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mkpf3-1muyaC1uaV-00mICR; Fri, 20
 Aug 2021 10:19:07 +0200
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
To: Eli Zaretskii <eliz@HIDDEN>, =?UTF-8?Q?Peter_M=c3=bcnster?= <pm@HIDDEN>
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN> <87a6likc5a.fsf@HIDDEN>
 <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN> <87czqbi03a.fsf@HIDDEN>
 <83czqb56i2.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <09998a72-76dc-42a6-dc15-612cbc942863@HIDDEN>
Date: Fri, 20 Aug 2021 10:19:06 +0200
MIME-Version: 1.0
In-Reply-To: <83czqb56i2.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:zEy1Eb+c81iMVlVS6cXfVRKXilg005kk0EgjXOulFJapBCMgt5s
 QpPdh6MUM7lRYvyUbp8rWv2bSbLcsOFjIpl+A6WHYjVXghXJZAMfToI0xhvCopQ3xL+msKF
 patZU2inrstna6vMiLY4Gh+IneC0X5dzhyhaH6+2giQGToXLKHs1qzBvSWSykKIfTe2c2xw
 cETGXdRNI/Va9JrqEmFlA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:dLEcL9RGOKU=:0TS3ut3pr+PbaHbK7s0/YX
 SYOnwakO88fMlLsJKUUB3hCBZAHokmUlIVfnrnlSJdpRllQi8u7OHIPTbiS6nYoOMP8VX7OB8
 b1OBDCOIGKeUDqxP5WQ4oVVNRb0N7PDf9CIICw2ZOha0lnjj7ioLi1SJUFOigVMV8OJZTbgNP
 o2PnIjfMoX3SImYw/nObceJF9Th1zZhKybPt5tTYHkaFRtJhz7MteRKqw2lI9tyuhlLQScwP2
 kcW4NXXo58qdkp9nyx83Cda/wW0Nf65kejwayFGRKBT+yssLWrji5jvpSsBLRCTC33tdP90AS
 JHAhkcIvrrIICnJNC0Vhv9ofuYwpn2ik/qM6goX3GeyBEvjlPAU3ZHgL/LngCQZ9R4XCICMj4
 0dUYf6SiubYbr2plw96jpirO60pvjHIF2J2lqf+VsPki/OixUjO6xX1bAcI8JrUYY3WkI0TOi
 PljJBYw35Exk2yhsBoa8BDDH7nPIuh67blKnFg+rbZFJ2cE5iHiD6buH17gpicJwkih+8RfiO
 PdEOvKkXPWenRm0a/Kq78PDBPAY1UnsHDjAJjgkaQIcuNVK4rs3PIwgEOgVFQqaTO0Wi5O6li
 a3A+42eisVHcDYtIbjggwK4HAyxlUf/kZ8FUTyfGAhlBdTBiacshTT4ye58rSn5zANYC6D6mp
 CIJmKgVmRnTgwEt2xsNkNjTMidnewyOi3aDUiZuWLBCnD5cHBSpe20yMN+6UmmxxTQphSLepw
 5z4DsmxPdgdM9JiBBH13X4uqsL4mNQWFOHmMTHv4dnt4e3gKEZN4Hy6xJhUSxTvr97SBHLqsM
 ubCSu1OETOL7NZysuiOZIEJwxyR5lK/iog9t83FBu4oL+OyOtnDIcU7rFhbM+VxIzqiMW6IBn
 GWJk/OcNZuSWD0FTqbYaQqiwtQu7WGlsr4+Abs8c7mjq8AOs7boZY0R0bVkKpEG0hNNvNkElY
 VNpIaP/eTOe9aD8awNmTP3uWdh1CsNpKpa2z22ANFO8l5yZ/Jwfc8CEiU8XSL+vZe/k7FOZ7u
 tusRItSLL7osym8HeF3EmesiHoQQBFfm5mnYBb2EWAbEwwjRzD34GD3OjESBvfZndqCFx1UNA
 7aJoa0m3FppSE2sVrfRdm+e5yYI9cMkfRIer5VjLj/L9hjpREfnFWeoJw==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > FWIW, I think this is a slippery slope, let alone
 > backward-incompatible change.  If we want to go anywhere near this
 > method, I'd suggest to create a variable with a list of events ignored
 > for the idleness purposes, which users could customize according to
 > their preferences and usage patterns (and, it turns out, their WM).
 > That would at least let users some kind of fire escape, whereas
 > hard-coding arbitrary events that we happen not to like this week
 > doesn't.

Until 2016 Qselect_window was the only event in this group.  And when
Michael fixed Bug#23207 by adding Qfile_notify you said

    Anyway, I think we should simply check all the special events that are
    not user events here.  If they don't have a binding in
    special-event-map, then the test will always fail.

    What about focus-in/out events?  Or xwidget-event?

and we finally ended up with

           && (EQ (XCAR (c), Qselect_window)
               || EQ (XCAR (c), Qfocus_out)
#ifdef HAVE_DBUS
	      || EQ (XCAR (c), Qdbus_event)
#endif
#ifdef USE_FILE_NOTIFY
	      || EQ (XCAR (c), Qfile_notify)
#endif
#ifdef THREADS_ENABLED
	      || EQ (XCAR (c), Qthread_event)
#endif
	      || EQ (XCAR (c), Qconfig_changed_event))

 > Btw, idleness is not the only feature related to this gray area:
 > there's also while-no-input, input-pending-p, and throw-on-input, to
 > mention a few.  Should these be in sync?

Here we have

(setq while-no-input-ignore-events
       '(focus-in focus-out help-echo iconify-frame
         make-frame-visible selection-request))

so this set and the above are certainly not "in sync".

But I have no idea how these two sets are supposed to interact and
whether and how they should be presented to users.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 18 Aug 2021 14:36:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 10:36:56 2021
Received: from localhost ([127.0.0.1]:57190 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGMga-0002bg-C2
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 10:36:56 -0400
Received: from quimby.gnus.org ([95.216.78.240]:38894)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mGMgY-0002bT-GJ
 for 49997 <at> debbugs.gnu.org; Wed, 18 Aug 2021 10:36:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=EVQGH1pIMDlr01emUKFP8pMaLFft9S+79qzgeahFz10=; b=R/sM780eWiJeqIG1CnYHEb2NNw
 DpplmxqdjG+4ljUwZIjsaxbqt/rlL22RT7N4H+PalWL2KZFAbciLnrmOY5YxBxleTVJDZMr5NwTaX
 BIjFyE0i72bz8+n8KGXGChf778CcYHPqolTJA/zEuQcVCJPqVRYJOVcqHxVHvKXpMIWs=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mGMgN-0000pe-So; Wed, 18 Aug 2021 16:36:48 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN>
 <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN>
 <87czqbi03a.fsf@HIDDEN> <83czqb56i2.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 16:36:43 +0200
In-Reply-To: <83czqb56i2.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 18 Aug
 2021 14:36:53 +0300")
Message-ID: <87im02bz0k.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: > FWIW, I think this
 is a slippery slope, let alone > backward-incompatible change. The slope has
 already been created, since we already filter out three events: 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, Peter =?utf-8?Q?M=C3=BCnster?= <pm@HIDDEN>,
 rudalics@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

> FWIW, I think this is a slippery slope, let alone
> backward-incompatible change.

The slope has already been created, since we already filter out three
events:

       if (CONSP (c)
           && (EQ (XCAR (c), Qselect_window)
+	      || EQ (XCAR (c), Qmove_frame)
               || EQ (XCAR (c), Qfocus_out)
 #ifdef HAVE_DBUS
 	      || EQ (XCAR (c), Qdbus_event)

> If we want to go anywhere near this method, I'd suggest to create a
> variable with a list of events ignored for the idleness purposes,
> which users could customize according to their preferences

I agree totally.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 18 Aug 2021 11:37:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 07:37:04 2021
Received: from localhost ([127.0.0.1]:55022 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGJsV-0003h6-Tt
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 07:37:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44700)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGJsU-0003gY-3D
 for 49997 <at> debbugs.gnu.org; Wed, 18 Aug 2021 07:37:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43528)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGJsN-0001Nq-OO; Wed, 18 Aug 2021 07:36:55 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2639
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mGJsN-0008R8-Ar; Wed, 18 Aug 2021 07:36:55 -0400
Date: Wed, 18 Aug 2021 14:36:53 +0300
Message-Id: <83czqb56i2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter =?iso-8859-1?Q?M=FCnster?= <pm@HIDDEN>
In-Reply-To: <87czqbi03a.fsf@HIDDEN> (message from Peter
 =?iso-8859-1?Q?M=FCnster?= on Wed, 18 Aug 2021 11:16:57 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN>
 <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN> <87czqbi03a.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: rudalics@HIDDEN, larsi@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Münster <pm@HIDDEN>
> Cc: Lars Ingebrigtsen <larsi@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>,
>   49997 <at> debbugs.gnu.org
> Date: Wed, 18 Aug 2021 11:16:57 +0200
> 
> > I can offer the attached trivial patch.  Peter, can you try it?
> 
> Thanks. Yes, it works as expected.
> 
> Now the question is: is this the right thing to do?
> 
> According to Eli
> (https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-08/msg01016.html)
> it's not so clear.
> 
> But on the other side, focus-out events and mouse movements keep the
> "idleness" too. So I guess, that frame movements could fall in the same
> category...

FWIW, I think this is a slippery slope, let alone
backward-incompatible change.  If we want to go anywhere near this
method, I'd suggest to create a variable with a list of events ignored
for the idleness purposes, which users could customize according to
their preferences and usage patterns (and, it turns out, their WM).
That would at least let users some kind of fire escape, whereas
hard-coding arbitrary events that we happen not to like this week
doesn't.

Btw, idleness is not the only feature related to this gray area:
there's also while-no-input, input-pending-p, and throw-on-input, to
mention a few.  Should these be in sync?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 18 Aug 2021 09:17:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 05:17:08 2021
Received: from localhost ([127.0.0.1]:54877 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGHh6-0006Ge-7S
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 05:17:08 -0400
Received: from server.a16n.net ([178.33.238.77]:56622)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mGHh2-0006Fz-Vv
 for 49997 <at> debbugs.gnu.org; Wed, 18 Aug 2021 05:17:07 -0400
Received: from ws.localdomain (arennes-556-1-251-22.w2-14.abo.wanadoo.fr
 [2.14.250.22])
 by server.a16n.net (Postfix) with ESMTPSA id A879C43E05D9;
 Wed, 18 Aug 2021 11:16:58 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1629278218; bh=q3hgOpoBmUbGINGoZkIwNucDt2mJuPEch/gzwZu/HkM=;
 h=From:To:Cc:Subject:References:Date;
 b=NVxJYy9v+FRIrIOrWICGAMy/dkIHlDhnTBWjIORXMfE+Z9/SozivfA7odOXzp1W27
 1mG/6NJemne+zj1sZBY/4QGEMmqXrYeLSfM7JEe4geyYGHeA1H8hX4w6Q/ae/upBpf
 V2VaDuYIB5N9cNw00hymA1+J1yvDIou4LNLELcA3yMGy0XO46AcnH039YOPPLDq0+S
 yWKbiifc7bElE2U6a6qOl+HZ9fn2rpyOZSOa2tdEki2fvXd7A5izxayymGsOD1ZFjT
 BWE9hPxhNaDJTZysp8yyRwiTUJ82Kh9NZLqG6wsHcmiTH+bAZzAfO7qGHKJwadq3+x
 Lt2bw/SM56w+g==
Received: by ws.localdomain (Postfix, from userid 1000)
 id 263257426DC; Wed, 18 Aug 2021 11:16:58 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN>
 <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN>
Date: Wed, 18 Aug 2021 11:16:57 +0200
Message-ID: <87czqbi03a.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 18 2021, martin rudalics wrote:

> I can offer the attached trivial patch.  Peter, can you try it?

Thanks. Yes, it works as expected.

Now the question is: is this the right thing to do?

According to Eli
(https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-08/msg01016.html)
it's not so clear.

But on the other side, focus-out events and mouse movements keep the
"idleness" too. So I guess, that frame movements could fall in the same
category...

=2D-=20
           Peter

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRzQCQwccG1AYTE2bi5u
ZXQACgkQOo4rb0Oxy2iVIQCgz9r4+ywNgnvzFsPOQH2hMaxvFMkAoONznZA0BWcF
j3Ox5oD0fb63NtpO
=g/Xt
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 18 Aug 2021 08:02:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 04:02:43 2021
Received: from localhost ([127.0.0.1]:54757 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGGX4-0004Fe-Tx
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 04:02:43 -0400
Received: from mout.gmx.net ([212.227.15.19]:42945)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1mGGX3-0004FR-25
 for 49997 <at> debbugs.gnu.org; Wed, 18 Aug 2021 04:02:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1629273754;
 bh=uurHfM5zBnPMTZ/F5dslsg9zRoX7w5v3rpGn5PWvNZg=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=ZD9B2rBW6J5TPJRz9aFcE/NIvbeiF3zy2jGKJk5YNmFjYAPjmiJjuqaCIjDQ1z4tY
 QTcWMDVRp3emh09NROOTyHvfU0wQU1xmrBERoywT3Aa1QCU4mvEBUk3IEh6ymQd52+
 D9jGGvnxLi8P/DrbP9mRFMItCf+6eK2fbBtmi+ZI=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.120]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1McH5a-1mm0qU2EQO-00chN5; Wed, 18
 Aug 2021 10:02:34 +0200
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
To: Lars Ingebrigtsen <larsi@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN> <87a6likc5a.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <0e03c073-2678-5f47-1a92-6a585c8dfe19@HIDDEN>
Date: Wed, 18 Aug 2021 10:02:33 +0200
MIME-Version: 1.0
In-Reply-To: <87a6likc5a.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------BB6E566BA5FFEA9FE4CAB48D"
Content-Language: en-US
X-Provags-ID: V03:K1:O3dNojgdCZbYoSnhcQivUhqzxWZixFjaLLjFZRZ6t9u4WTdXHB/
 Cuj0OJLgPo2fYjec3/4h8nKDqaxGUp3ylmjVCL6hvfNcY9j/4xVid0L0gGmLs+QTH4QcfbW
 DXZInbFxFKs+hTrkAt20nXeOZgqByTWIHu7cj9hsrbU/x2NZe93N043LpbM4Zhbk4yl0MO4
 YPc/fx+62PmZdaWc1Bg2g==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:85btum/ss6k=:0qtFnw7TScnr5v/lc3AUaU
 s25u2r09w7R0FDUuF0V1IX26/aFraat/RKqDfefDctIAlqbmq202cZsdM7hCdS+X9INjwnaLO
 dA8wQK+VlbdojiScWpXdoU727ZyL+ohg79/dLojjWDykQD3Tywyjfrn8u6jcdL/cQk1kI/C9z
 j8u/+zBpKexeBtt2IqNKAtLRb1eGNS8eoZURJoAmSUUvPYw6ZvsZveUKMeA5SQiXpf0VaaP2y
 SopPrOTdfgh0oP80Ba1fzFBhFhvsl0DWMgSVir9PkZmlwUGbfD166CAgrotHrNSaJE0h/wEeM
 q0P7Bbuzt4RDnv1CDCdjBLDidoAdKESPTFQtEUPJQmbf0opEOUmlUuojXAeRQVCOnQuuuhezT
 aOwT0rnkr3G3o4eGpMUKnEx9e8aBJCjNciQHCIoASstxaJu+ORYCOiG3vY4Bm93wSsRUAybir
 38sr1wMpxC5/DsTL8o1CYywCKf8PFtZIOvgUM3Z6NT4tTI5OMZovTu+JueNkvY9b8l3wdNnEf
 8p4UhpfKV/qYK/WXd5fFLTlQeduBnKa2CyfWWk7qp1q7P6uJnVovEULtpAo8n9x5rK3WXaLhS
 7s8KHo2qkr95qk7Qf7QkmuFAMTCY3y9OY9UOmAs7NUQLloy6Zm2lqN62HtF6+E9FbCJgV/hk5
 kRTVvOTNtj7NPI6das4Y1WroUpRQDrw3AoGRwFzMwnZVWDVWQ/UO3PEzpU0ke/MB5JIJsRD0T
 RyHD/2aJHz23pX8Q0z8exOWYzu/8EKFhndgeUifs+eoYgAH2rZifYizhIgqJb3O+jNX+gTVmc
 +fFnocf2a28RpU4XW607IsnSenQLA4Xf17sDyFGQtae3DxUmVAGJVByL9vkXqjow274z40hgj
 9AtuTCZh+Sv82wCSyKCAvlXElNDbxPfCySEaBxb0c7+xhmCIuYMQbgGTwRXXJkOvatit4c4cf
 1FjRU2R1bEzcIWOTayzsFJziQOa6TnBUSxOYqUcV6rnWIj+G/8wR9OB+jEM0tvDmBrLLGKCCu
 rUp97jqSHyVYsV29x4rKm9YxLvXQJcKHE4OkGTlIdrRMKB24lYCegRnF7gDJp9hpuBdhw3YiJ
 VblrItFlKpD88FQWdBnI09+F67NuAuTnTxjppYTaKpxE3zNuqOP/guxug==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------BB6E566BA5FFEA9FE4CAB48D
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

 >> The code you show is in keyboard.c, where we interpret the events
 >> we've received.  To see whether we can distinguish between these
 >> events and "real" move-frame events, we need to look in xterm.c, where
 >> the events come in from the window-system.  Maybe they are different
 >> in their raw form?
 >
 > Ah, I see.  Right, this is in handle_one_xevent, where we apparently
 > synthesise the MOVE_FRAME_EVENT:
 >
 > 	      if (!FRAME_TOOLTIP_P (f)
 > 		  && (old_left != f->left_pos || old_top != f->top_pos))
 > 		{
 > 		  inev.ie.kind = MOVE_FRAME_EVENT;
 > 		  XSETFRAME (inev.ie.frame_or_window, f);
 > 		}
 > 	    }
 >
 > So it's purely based on whether the window manager told is that the
 > position changed -- which I guess it sort of does?  When I move to a
 > different virtual desktop, it shows me all the iconified frames, and
 > that's probably where this comes from?
 >
 > This is in:
 >
 >      case ConfigureNotify:
 >
 > that case in itself is almost 200 lines long...
 >
 > I've added Martin to the CCs; perhaps he has some insights here.

I can offer the attached trivial patch.  Peter, can you try it?

martin

--------------BB6E566BA5FFEA9FE4CAB48D
Content-Type: text/x-patch;
 name="move-frame.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="move-frame.diff"

diff --git a/src/keyboard.c b/src/keyboard.c
index 34c64b9186..e643d3267b 100644
=2D-- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2929,6 +2929,7 @@ read_char (int commandflag, Lisp_Object map,

       if (CONSP (c)
           && (EQ (XCAR (c), Qselect_window)
+	      || EQ (XCAR (c), Qmove_frame)
               || EQ (XCAR (c), Qfocus_out)
 #ifdef HAVE_DBUS
 	      || EQ (XCAR (c), Qdbus_event)

--------------BB6E566BA5FFEA9FE4CAB48D--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 19:54:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 15:54:27 2021
Received: from localhost ([127.0.0.1]:51075 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFigh-0005SG-EU
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 15:54:27 -0400
Received: from server.a16n.net ([178.33.238.77]:54452)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mFigb-0005Rt-QV
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 15:54:22 -0400
Received: from ws.localdomain (arennes-662-1-84-172.w2-14.abo.wanadoo.fr
 [2.14.50.172])
 by server.a16n.net (Postfix) with ESMTPSA id 52CB043E04D6;
 Mon, 16 Aug 2021 21:54:11 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1629143651; bh=5GEGgIaDh/57XEDLDeRkeDTkJphD7QyF1rS55lOfK9w=;
 h=From:To:Cc:Subject:References:Date;
 b=h06V4raR/CqE2lLuZyUFMnYNO4ujOc/gwO8unQMGLNLAYcWAwIOS9Dor4+iXmh4xP
 pepbmMCTisXiddIVTLV+wNuquSOGz6IWnNm/fPhK5MtncubtU1IrCz4ZDLR3uWnI3C
 +vCv+PuSEEpv4Yf/orsP4auZmMbkqJGyxDnx5LhoxMmU7bHON7DBVP4Q+Fp4QKuJqK
 l+r9C8oJPwnSYxvHZkWOhJPEDHiziu+iZkOCZz//57lgXrR4FkIaMMKPU+jnk6RFtM
 lD/NIXgjFh+bnkuOpPtmHxMdGh4U6FIHl17IfSHOdZomCNSFlMUmBOojD8a66Y35sc
 SeUPFKKFveLeA==
Received: by ws.localdomain (Postfix, from userid 1000)
 id 783487426C5; Mon, 16 Aug 2021 21:54:10 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN> <87a6lho0a8.fsf@HIDDEN>
 <834kbp8jvq.fsf@HIDDEN> <87k0klmjdl.fsf@HIDDEN>
 <83wnol72sy.fsf@HIDDEN> <87o89xl3hu.fsf@HIDDEN>
 <83v94571b5.fsf@HIDDEN> <87a6lhl1s7.fsf@HIDDEN>
 <83r1et6z47.fsf@HIDDEN>
Date: Mon, 16 Aug 2021 21:54:10 +0200
Message-ID: <8735r92mjh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 16 2021, Eli Zaretskii wrote:

> When Emacs receives this event, it does process it: it generates the
> move-frame pseudo-function key, which is bound to the command
> handle-move-frame.

Ok, then I think nothing should be done in Emacs, and I should look for
other solutions for my quite particular problem.

=2D-=20
           Peter

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRrCYgwccG1AYTE2bi5u
ZXQACgkQOo4rb0Oxy2hXzQCgo3t8XFoHr2d6EGPppUBNUATfTN8AoMPeC6FHBSg1
yWCj8lT9COKT1VGl
=WHPk
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 18:09:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 14:09:12 2021
Received: from localhost ([127.0.0.1]:50934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFh2t-0002jG-SG
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 14:09:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43978)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFh2r-0002j1-Og
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 14:09:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56906)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFh2m-0008Vh-1w; Mon, 16 Aug 2021 14:09:04 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1975
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFh2l-00054d-LI; Mon, 16 Aug 2021 14:09:03 -0400
Date: Mon, 16 Aug 2021 21:08:56 +0300
Message-Id: <83r1et6z47.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter =?iso-8859-1?Q?M=FCnster?= <pm@HIDDEN>
In-Reply-To: <87a6lhl1s7.fsf@HIDDEN> (message from Peter
 =?iso-8859-1?Q?M=FCnster?= on Mon, 16 Aug 2021 19:47:36 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN> <87a6lho0a8.fsf@HIDDEN>
 <834kbp8jvq.fsf@HIDDEN> <87k0klmjdl.fsf@HIDDEN>
 <83wnol72sy.fsf@HIDDEN> <87o89xl3hu.fsf@HIDDEN>
 <83v94571b5.fsf@HIDDEN> <87a6lhl1s7.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Münster <pm@HIDDEN>
> Cc: larsi@HIDDEN,  49997 <at> debbugs.gnu.org
> Date: Mon, 16 Aug 2021 19:47:36 +0200
> 
> > The only definition of "idleness" we can use in Emacs is that Emacs is
> > not processing any input events.
> 
> I agree. So the question is: Does Emacs process a window movement, when
> it's not visible? If yes, what does it do? If not, then you seem to
> agree to not resetting the idle timer.

When Emacs receives this event, it does process it: it generates the
move-frame pseudo-function key, which is bound to the command
handle-move-frame.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 17:47:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 13:47:46 2021
Received: from localhost ([127.0.0.1]:50909 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFgiA-00025j-FP
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 13:47:46 -0400
Received: from server.a16n.net ([178.33.238.77]:46676)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mFgi7-00025S-MX
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 13:47:45 -0400
Received: from ws.localdomain (arennes-662-1-84-172.w2-14.abo.wanadoo.fr
 [2.14.50.172])
 by server.a16n.net (Postfix) with ESMTPSA id 0EDC443E05F3;
 Mon, 16 Aug 2021 19:47:36 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1629136057; bh=GNPYiQfELGgakqN6/jfHrKg3b7sWs90aFg+9DNNWw/Y=;
 h=From:To:Cc:Subject:References:Date;
 b=P6lLfjuYCRQb/lJ3pWVwRWQTjWfoFVukusjl0Ko+m0PNKDHRx2WccXyualmj+qY1J
 YRusqhs4YO5tJnlo1XnYvhjrC+e7A4gwRl+mcarHhtCI4FbqHZe5bX/m/+ZYSxGHje
 4paemuQ3pXit1SfduRlLI6a685jlbX8TQ91PqSeXMC99UgmVq56qMNBhFrvrx48Zr/
 wrJo/Quii7G1uVCLEcRHZOEyZmsB4cAEj9mUjjL1eRHug3nzso4H0kdYpfDGMNcobI
 dZbv43uBPjxlEFXdf7WjJOmBsJ9wILCf8+/dO5yBSVBLp1NCywPzk8lHTBrDJc2FN5
 n2iIkaGBOnXDw==
Received: by ws.localdomain (Postfix, from userid 1000)
 id 6A4727426BB; Mon, 16 Aug 2021 19:47:36 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN> <87a6lho0a8.fsf@HIDDEN>
 <834kbp8jvq.fsf@HIDDEN> <87k0klmjdl.fsf@HIDDEN>
 <83wnol72sy.fsf@HIDDEN> <87o89xl3hu.fsf@HIDDEN>
 <83v94571b5.fsf@HIDDEN>
Date: Mon, 16 Aug 2021 19:47:36 +0200
Message-ID: <87a6lhl1s7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 16 2021, Eli Zaretskii wrote:

> The only definition of "idleness" we can use in Emacs is that Emacs is
> not processing any input events.

I agree. So the question is: Does Emacs process a window movement, when
it's not visible? If yes, what does it do? If not, then you seem to
agree to not resetting the idle timer.

=2D-=20
           Peter

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRqkuAwccG1AYTE2bi5u
ZXQACgkQOo4rb0Oxy2iQ8gCgjv0U/EBCovIy8EpdRKMzvEQ5DoAAn3qvWlrdVWRf
0MJm+rrPhJKNrDVN
=M78/
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 17:21:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 13:21:50 2021
Received: from localhost ([127.0.0.1]:50883 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFgJ4-0001OE-9b
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 13:21:50 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59570)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFgJ1-0001Ny-S2
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 13:21:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55174)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFgIw-0000iG-3V; Mon, 16 Aug 2021 13:21:42 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3015
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFgIv-0006fj-JB; Mon, 16 Aug 2021 13:21:42 -0400
Date: Mon, 16 Aug 2021 20:21:34 +0300
Message-Id: <83v94571b5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter =?iso-8859-1?Q?M=FCnster?= <pm@HIDDEN>
In-Reply-To: <87o89xl3hu.fsf@HIDDEN> (message from Peter
 =?iso-8859-1?Q?M=FCnster?= on Mon, 16 Aug 2021 19:10:37 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN> <87a6lho0a8.fsf@HIDDEN>
 <834kbp8jvq.fsf@HIDDEN> <87k0klmjdl.fsf@HIDDEN>
 <83wnol72sy.fsf@HIDDEN> <87o89xl3hu.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Münster <pm@HIDDEN>
> Cc: larsi@HIDDEN,  49997 <at> debbugs.gnu.org
> Date: Mon, 16 Aug 2021 19:10:37 +0200
> 
> >> But IMHO the idle time should not be reset to 0, when the window moves.
> >
> > Not even when the user moves the window? why not?
> 
> Because that's my understanding of idleness: when nothing is done inside
> of Emacs, the idle timer should keep running. When the window is just
> moved to another place, there is no real input.
> Same with my kid: when he sleeps, he keeps sleeping even when I carry him
> to another bedroom... ;)

The only definition of "idleness" we can use in Emacs is that Emacs is
not processing any input events.  This is fundamental.  I don't know
how to define "nothing is done inside Emacs" otherwise.  If taken
literally, this is something that never happens, because the main loop
in Emacs always runs, and always "does things".

> Anyway: when the user moves the window, there will be certainly also an
> focus-in event, that can trigger the reset of the idle timer.

So focus-in events are different for some reason?  I guess we will
have to agree to disagree.

That said, we could perhaps provide user control on what constitutes
an event that can stop the idleness.  Some sort of list of events that
are disregarded for this purpose, maybe.  Patches welcome.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 17:10:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 13:10:54 2021
Received: from localhost ([127.0.0.1]:50865 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFg8Q-00016C-3P
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 13:10:54 -0400
Received: from server.a16n.net ([178.33.238.77]:43952)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mFg8K-00015v-Gz
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 13:10:48 -0400
Received: from ws.localdomain (arennes-662-1-84-172.w2-14.abo.wanadoo.fr
 [2.14.50.172])
 by server.a16n.net (Postfix) with ESMTPSA id 410B743E04D6;
 Mon, 16 Aug 2021 19:10:38 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1629133838; bh=0u3XwJoGhOqfR11B7EmiMIiqhUz359BvxObVCd4TwyI=;
 h=From:To:Cc:Subject:References:Date;
 b=ilfh46oqkyMgkv+gShtFc9eyDL9f3r+Qik7NSyVUPI5N4elrcKpEL27uuCGBH6l1w
 hTMXvLoZWbsub8HcamYC1hHDlMbYTdKYvledS7jrVNk13IbVArAon54YufzuWr98CA
 QCfo0XPiPnf8Zn9kB1IPI45eVyoOoT7KebGBJRpsH7SQ0p8O0EDf20gcFiAGib6H0B
 jGpeT0S1ZRdA1cdRtqRbi4hUyp7LhP/PRFWsdIEEWsVUS1ZQQ8Qrp2EMs1nZd89gBc
 rnR2vIjzvzTNGpASuUmDcU7pFyD4+7isstiI3dCTNECo+9rcgRhQijtfZDfltka7lW
 TIWJEoUnptLfw==
Received: by ws.localdomain (Postfix, from userid 1000)
 id 6F7607426BB; Mon, 16 Aug 2021 19:10:37 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN> <87a6lho0a8.fsf@HIDDEN>
 <834kbp8jvq.fsf@HIDDEN> <87k0klmjdl.fsf@HIDDEN>
 <83wnol72sy.fsf@HIDDEN>
Date: Mon, 16 Aug 2021 19:10:37 +0200
Message-ID: <87o89xl3hu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 16 2021, Eli Zaretskii wrote:

>> But IMHO the idle time should not be reset to 0, when the window moves.
>
> Not even when the user moves the window? why not?

Because that's my understanding of idleness: when nothing is done inside
of Emacs, the idle timer should keep running. When the window is just
moved to another place, there is no real input.
Same with my kid: when he sleeps, he keeps sleeping even when I carry him
to another bedroom... ;)

Anyway: when the user moves the window, there will be certainly also an
focus-in event, that can trigger the reset of the idle timer.

=2D-=20
           Peter

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRqcDQwccG1AYTE2bi5u
ZXQACgkQOo4rb0Oxy2hFNwCfSek86hdorLhyyFOo3rJVmObrJZwAoMg+51mfIiUV
Wc6vEeCe2SvyFoih
=MP3L
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 16:49:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 12:49:45 2021
Received: from localhost ([127.0.0.1]:50836 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFfnm-0000Xg-Hf
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 12:49:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49906)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFfnj-0000XS-M2
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 12:49:28 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53794)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFfnd-0003MG-Qh; Mon, 16 Aug 2021 12:49:22 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4999
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFfnd-0000qk-Cq; Mon, 16 Aug 2021 12:49:21 -0400
Date: Mon, 16 Aug 2021 19:49:17 +0300
Message-Id: <83wnol72sy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter =?iso-8859-1?Q?M=FCnster?= <pm@HIDDEN>
In-Reply-To: <87k0klmjdl.fsf@HIDDEN> (message from Peter
 =?iso-8859-1?Q?M=FCnster?= on Mon, 16 Aug 2021 18:42:14 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN> <87a6lho0a8.fsf@HIDDEN>
 <834kbp8jvq.fsf@HIDDEN> <87k0klmjdl.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Peter Münster <pm@HIDDEN>
> Cc: larsi@HIDDEN,  49997 <at> debbugs.gnu.org
> Date: Mon, 16 Aug 2021 18:42:14 +0200
> 
> > Is there a way to detect that the origin changed?
> 
> I guess no.

Too bad.

> But IMHO the idle time should not be reset to 0, when the window moves.

Not even when the user moves the window? why not?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 16:42:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 12:42:26 2021
Received: from localhost ([127.0.0.1]:50827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFfgw-0000Lw-KQ
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 12:42:26 -0400
Received: from server.a16n.net ([178.33.238.77]:41934)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mFfgs-0000Ld-2e
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 12:42:25 -0400
Received: from ws.localdomain (arennes-662-1-84-172.w2-14.abo.wanadoo.fr
 [2.14.50.172])
 by server.a16n.net (Postfix) with ESMTPSA id 6EB3243E04D6;
 Mon, 16 Aug 2021 18:42:15 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1629132135; bh=T0O+0hzaUvtmoDtV1evq7BYyDQLP3VDk2VjLhcXeMz8=;
 h=From:To:Cc:Subject:References:Date;
 b=cy5OCrYwhaXOv2uWmPGyvrEAdnWHrr69bcL9w1T8KyPoDgYjxwsTsoJguBtovgyvj
 kKVmtUaC0XQgKMkvCWe5R7PL1TD9tVVsPPHvkkCqbScjAmAt4QLdOB7Km3VbNHWRg9
 VGJ9L1WyMNXI03FEttVzTZwX+Az2Tj45kJs6x/2kRuXHYkNP7sBQhNgK0TyajQXOLT
 B5plQNB6TgSuL9KtzlbPjl7OPIdpZ+bvmUs4kiWzxubsf35cyfuk3PbYbLDdWk/07l
 tUpAbpr4wlUncNUi0Hc9BHHeSsENJXO5bGoQEf/yG3sspmqWGe/UGAWPbvY1sKDV6x
 Nfg6kOcash3vA==
Received: by ws.localdomain (Postfix, from userid 1000)
 id 08E807426BB; Mon, 16 Aug 2021 18:42:15 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN> <87a6lho0a8.fsf@HIDDEN>
 <834kbp8jvq.fsf@HIDDEN>
Date: Mon, 16 Aug 2021 18:42:14 +0200
Message-ID: <87k0klmjdl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 16 2021, Eli Zaretskii wrote:

> Is there a way to detect that the origin changed?

I guess no.

But IMHO the idle time should not be reset to 0, when the window moves.

=2D-=20
           Peter

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRqVZgwccG1AYTE2bi5u
ZXQACgkQOo4rb0Oxy2jx3ACgkZ9bk/ji6H5nT4fhcaoZ0FggzxkAn1Ul6AZM+UeS
P+UnKEYKjn8vjNHt
=fVGL
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 15:55:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 11:55:35 2021
Received: from localhost ([127.0.0.1]:50796 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFexX-0007Wb-1R
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 11:55:35 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37964)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFexQ-0007WF-Nl
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 11:55:28 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52456)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFexL-0000Wf-EN; Mon, 16 Aug 2021 11:55:19 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1493
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFexD-00022f-Dz; Mon, 16 Aug 2021 11:55:17 -0400
Date: Mon, 16 Aug 2021 18:55:05 +0300
Message-Id: <834kbp8jvq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter =?iso-8859-1?Q?M=FCnster?= <pm@HIDDEN>
In-Reply-To: <87a6lho0a8.fsf@HIDDEN> (message from Peter
 =?iso-8859-1?Q?M=FCnster?= on Mon, 16 Aug 2021 17:51:43 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN> <87a6lho0a8.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Münster <pm@HIDDEN>
> Cc: larsi@HIDDEN,  49997 <at> debbugs.gnu.org
> Date: Mon, 16 Aug 2021 17:51:43 +0200
> 
> > Can you tell what is "serial 18" in our xterm.c nomenclature?
> 
> I don't know. But according to XEvent(3) it's the "number of last
> request processed by server".

Thanks.  So that won't help.

> > IOW, what does this ConfigureNotify report to us?
> 
> It seems to me, that it reports a new position: (3843,2334)
> The position changes, because the viewport changes, and so the origin
> (point 0,0) too.

Is there a way to detect that the origin changed?  If so, we could
perhaps teach Emacs that when the coordinates change due to the change
in origin, it isn't a move at all.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 15:51:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 11:51:53 2021
Received: from localhost ([127.0.0.1]:50784 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFeu1-0007QJ-1q
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 11:51:53 -0400
Received: from server.a16n.net ([178.33.238.77]:34670)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mFetz-0007Q5-8H
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 11:51:52 -0400
Received: from ws.localdomain (arennes-662-1-84-172.w2-14.abo.wanadoo.fr
 [2.14.50.172])
 by server.a16n.net (Postfix) with ESMTPSA id BA18543E05F3;
 Mon, 16 Aug 2021 17:51:44 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1629129104; bh=6+ikHtIstV7aRhviqiYPWCFBhl1pXRjl2YWa3pTd7hs=;
 h=From:To:Cc:Subject:References:Date;
 b=S/6RU7UIwWQwbsvaMuX4yEeTW5HZfw3H84SIGlt2WmuVUpJDWIWP5sALXsfK2Sn4v
 aVwkyVhvucKgnIIWI804RTu08ioC88VFDX3mA6IUCHj4d1sQrFFytrAHk0o8E3nzGL
 9/RLfVHF64+Ptjf081udzVQFg8RCPtCMzevXP6Vm+dda+TFb5iFMIh/lmJzXazLjuz
 JscjEbO09rTNb6tZAqNbUeGrCdJpWKYfhNWhoMY/56XcnGQ21/Z97nTpJEZJLWzceK
 +y0kTC+Qs7hDaso81YMu2i6b5lStIFDrJEoXFphuHdfzz1lOuA9UlusKnfR1ON7euE
 EwDhf0D7W3yew==
Received: by ws.localdomain (Postfix, from userid 1000)
 id 2F0A37426BB; Mon, 16 Aug 2021 17:51:44 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
 <83r1et8v11.fsf@HIDDEN>
Date: Mon, 16 Aug 2021 17:51:43 +0200
Message-ID: <87a6lho0a8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 16 2021, Eli Zaretskii wrote:

>> ConfigureNotify event, serial 18, synthetic YES, window 0x140013e,
>> event 0x140013e, window 0x140013e, (3843,2334), width 3389, height 1963,

> Can you tell what is "serial 18" in our xterm.c nomenclature?

I don't know. But according to XEvent(3) it's the "number of last
request processed by server".


> IOW, what does this ConfigureNotify report to us?

It seems to me, that it reports a new position: (3843,2334)
The position changes, because the viewport changes, and so the origin
(point 0,0) too.

=2D-=20
           Peter

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRqJjwwccG1AYTE2bi5u
ZXQACgkQOo4rb0Oxy2gFoACg26AMngT/zBPPwinR3z0wpF34SSkAoOU+gvTUExvI
HrIe1EBtxcRL0S3m
=VIPG
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 11:54:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 07:54:38 2021
Received: from localhost ([127.0.0.1]:48682 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFbCM-0002NQ-2t
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 07:54:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37760)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFbCH-0002N3-8x
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 07:54:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44742)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFbCA-00064S-SO; Mon, 16 Aug 2021 07:54:22 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2546
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFbCA-0003oV-Ff; Mon, 16 Aug 2021 07:54:22 -0400
Date: Mon, 16 Aug 2021 14:54:18 +0300
Message-Id: <83r1et8v11.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter =?iso-8859-1?Q?M=FCnster?= <pm@HIDDEN>
In-Reply-To: <875yw57t2e.fsf@HIDDEN> (message from Peter
 =?iso-8859-1?Q?M=FCnster?= on Mon, 16 Aug 2021 09:22:01 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Münster <pm@HIDDEN>
> Date: Mon, 16 Aug 2021 09:22:01 +0200
> Cc: 49997 <at> debbugs.gnu.org
> 
> > Do you get focus-in events when you do the changing between pages in the
> > way you describe?
> 
> No. Neither focus-in nor focus-out events...
> 
> Now I've checked the events with "xev -id 0x140013e":
> 
> ConfigureNotify event, serial 18, synthetic YES, window 0x140013e,
>     event 0x140013e, window 0x140013e, (3843,2334), width 3389, height 1963,
>     border_width 0, above 0xa0016e, override NO

Can you tell what is "serial 18" in our xterm.c nomenclature?  IOW,
what does this ConfigureNotify report to us?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 11:43:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 07:43:48 2021
Received: from localhost ([127.0.0.1]:48664 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFb1v-00022L-PK
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 07:43:47 -0400
Received: from quimby.gnus.org ([95.216.78.240]:42440)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFb1t-00021y-G5
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 07:43:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=mx/wU2yZDY9vvFvDVzt6g5Q4ADHHGuWlDxrf8fUNh8U=; b=KsUvSlF/6kkHi4ktqRaNvQ8cVX
 ZFeuJZaVjuamZB5sSSYc1wn0TvaOs17PvMhyM28MwzWPzzKLg/NHqOyWlhfDJTE8nOStI2GYgaKCR
 Sr3RDpegfN03ajrLCLP+2RAzF+chfthimTQBuvR2f+8z7bcY73qfat+3hwGn7AZ2KDdQ=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFb1i-0004KP-F3; Mon, 16 Aug 2021 13:43:38 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Peter =?utf-8?Q?M=C3=BCnster?= <pm@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN> <875yw57t2e.fsf@HIDDEN>
Date: Mon, 16 Aug 2021 13:43:29 +0200
In-Reply-To: <875yw57t2e.fsf@HIDDEN> ("Peter =?utf-8?Q?M=C3=BCnster=22's?=
 message of "Mon, 16 Aug 2021 09:22:01 +0200")
Message-ID: <87fsv9fwda.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Peter Münster <pm@HIDDEN> writes: >> Do you get focus-in
    events when you do the changing between pages in the >> way you describe?
    > > No. Neither focus-in nor focus-out events... So I guess our window managers
    are sending us different events in this case... 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Peter M=C3=BCnster <pm@HIDDEN> writes:

>> Do you get focus-in events when you do the changing between pages in the
>> way you describe?
>
> No. Neither focus-in nor focus-out events...

So I guess our window managers are sending us different events in this
case...

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 16 Aug 2021 07:22:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 03:22:10 2021
Received: from localhost ([127.0.0.1]:48371 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFWwk-0001Lc-Ll
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 03:22:10 -0400
Received: from server.a16n.net ([178.33.238.77]:54674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mFWwi-0001LO-Vc
 for 49997 <at> debbugs.gnu.org; Mon, 16 Aug 2021 03:22:10 -0400
Received: from ws.localdomain (arennes-662-1-84-172.w2-14.abo.wanadoo.fr
 [2.14.50.172])
 by server.a16n.net (Postfix) with ESMTPSA id 5114F43E04D6;
 Mon, 16 Aug 2021 09:22:02 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1629098522; bh=FjlQe0vjFGTH4In18bsk7CC9A3acl3ixkCAmr/9joC0=;
 h=From:To:Cc:Subject:References:Date;
 b=IFrPxqiN9cpOxSYWI7xMUh4z4PidaGD+GJsgFpzJ8x6IYN6hKGUIBYdSKQOTgxPyK
 Zwjw4/cXulHNsjZX/A+c5KtY2EoHA+4K6JOVMCD6cYhtCNtmx9sP/PY9a/x8ZCKEdp
 HIy/HJ79BgnFLyWuQQ7sMbRK5j+M3lKcRsfUqoRMhNs6lcktwInjt2CbklOLkJ0//V
 +dmxWP/RQPOeRwvebTj28P7Yx6b+d4GVVwS7RqiTUxhEkLa7XJXXBJiidG1lUz14ii
 P3PYPJRlrtDs9Dpje74AS8gX6Cfa5cW5dMu1UFbYJOtr9sJQhwWfJbfDd1funr/E3P
 cLp3oGdhyb22A==
Received: by ws.localdomain (Postfix, from userid 1000)
 id CE0A97411F0; Mon, 16 Aug 2021 09:22:01 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
 <874kbqihul.fsf@HIDDEN>
Date: Mon, 16 Aug 2021 09:22:01 +0200
Message-ID: <875yw57t2e.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Sun, Aug 15 2021, Lars Ingebrigtsen wrote:

> Do you get focus-in events when you do the changing between pages in the
> way you describe?

No. Neither focus-in nor focus-out events...

Now I've checked the events with "xev -id 0x140013e":

ConfigureNotify event, serial 18, synthetic YES, window 0x140013e,
    event 0x140013e, window 0x140013e, (3843,2334), width 3389, height 1963,
    border_width 0, above 0xa0016e, override NO

=2D-=20
           Peter

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRoSGQwccG1AYTE2bi5u
ZXQACgkQOo4rb0Oxy2j4mwCeJ0zGWfSWFUgKZJ2ziRBPM9XoSOYAnjCXbvvv0tY6
polPN5CvYYDFTNwK
=1RJC
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 20:16:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 16:16:51 2021
Received: from localhost ([127.0.0.1]:47827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFMYt-0005b5-5v
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 16:16:51 -0400
Received: from quimby.gnus.org ([95.216.78.240]:35262)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFMYr-0005as-6V
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 16:16:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=gGzP++DwsTHgJ0/M1cApA5zAh3Lys9EoaEFEKZqm1wY=; b=moIZ95HcUPvQQHPzbBDhYtV5FA
 35wR2cGPRJV7Xj9B6I1xQoIRrh2T3/ntfdNA1sWJbCKUpYe8/4JX66Xd0gf/PUyNEDJxMY2r8xGSm
 P7oA7OSQQFKEUI97sG1S1ztdtarlQMVzfj5RWj3X1FnS75Er+Wh0W6sdOmzlx9XXdYZo=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFMYg-0004Us-EE; Sun, 15 Aug 2021 22:16:42 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Peter =?utf-8?Q?M=C3=BCnster?= <pm@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <87y292h3yd.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 22:16:34 +0200
In-Reply-To: <87y292h3yd.fsf@HIDDEN> ("Peter =?utf-8?Q?M=C3=BCnster=22's?=
 message of "Sun, 15 Aug 2021 22:02:02 +0200")
Message-ID: <874kbqihul.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Peter Münster <pm@HIDDEN> writes: > On Wed, Aug 11 2021,
    Peter Münster wrote: > >> 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. > > Just to be c [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Peter M=C3=BCnster <pm@HIDDEN> writes:

> On Wed, Aug 11 2021, Peter M=C3=BCnster wrote:
>
>> 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.
>
> Just to be clear: That means, that Emacs is already out of focus
> *before* the page change. And after the page change too.

Oh, then we're not seeing the exact same behaviour -- when I switch
virtual desktops in Gnome (where Emacs isn't on any of them), then idle
time isn't reset.

But I guess it's window manager dependent.

Do you get focus-in events when you do the changing between pages in the
way you describe?  Try putting something on focus-in-hook -- that should
be run when Emacs gets a focus-in event.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 20:02:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 16:02:21 2021
Received: from localhost ([127.0.0.1]:47811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFMKn-0005G9-7M
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 16:02:21 -0400
Received: from server.a16n.net ([178.33.238.77]:57816)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mFMKh-0005Fq-9g
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 16:02:15 -0400
Received: from ws.localdomain (lfbn-ren-1-1338-34.w86-229.abo.wanadoo.fr
 [86.229.185.34])
 by server.a16n.net (Postfix) with ESMTPSA id 3D07B43E04D6
 for <49997 <at> debbugs.gnu.org>; Sun, 15 Aug 2021 22:02:04 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1629057724; bh=Nmmuzlh/Vx32WiZrfhjMVgqcRM7cJv0r4opBnLEe0cQ=;
 h=From:To:Subject:References:Date;
 b=dcx6iznZ6gUzZQHcopx9DGqiMvXYaXmYQozIkEnDcdwaZDfBj/BRsHl2Z2UqI0CVU
 fJ14NZuDi7wfHjdbWHoUk+1tWCiZGfIVqdgSmqgv53i0IlpcjqzyGJPNuNx5AxebIj
 nO9l7hcj4WdSbP3iXxrtPVr0VtTk0dM/fg2mrmz+WhfbpeVUnb89AOAc3uLbSjzL/O
 qOr7xG7OMYQMfN4XndrxfQNbqb4uc6wEpJySApOTflWhwNEYFw1tV0U0hugP0E/bCU
 PptSOnxA9y8ks5UY2LY2c1GVRsHEwsCY5o8nU3kjDSvI435XvD8sjT3y2KxL/O8cJG
 vPSuWQY00eCuQ==
Received: by ws.localdomain (Postfix, from userid 1000)
 id 0B59B740BDB; Sun, 15 Aug 2021 22:02:03 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: 49997 <at> debbugs.gnu.org
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 22:02:02 +0200
Message-ID: <87y292h3yd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha1; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49997
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 11 2021, Peter M=C3=BCnster wrote:

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

Just to be clear: That means, that Emacs is already out of focus
*before* the page change. And after the page change too.

=2D-=20
           Peter

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRlyugwccG1AYTE2bi5u
ZXQACgkQOo4rb0Oxy2jDxgCgyTXmwX+R1vyRo9WvBnpMTZiNfngAoJr9Tr9c3CZU
W+qO+s8+p59mc5HO
=fZrX
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 17:39:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 13:39:55 2021
Received: from localhost ([127.0.0.1]:47695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFK71-0007we-80
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 13:39:55 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFK6y-0007wP-Sy
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 13:39:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52248)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFK6t-0001BG-7E; Sun, 15 Aug 2021 13:39:47 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3018
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFK6r-0003Oi-Rq; Sun, 15 Aug 2021 13:39:47 -0400
Date: Sun, 15 Aug 2021 20:39:30 +0300
Message-Id: <831r6ua9pp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87h7fqiqco.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sun, 
 15 Aug 2021 19:12:55 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN>
 <87y292isxp.fsf@HIDDEN> <838s12ac5f.fsf@HIDDEN>
 <837dgmac13.fsf@HIDDEN> <87h7fqiqco.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, pm@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: 49997 <at> debbugs.gnu.org,  pm@HIDDEN
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 17:13:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 13:13:10 2021
Received: from localhost ([127.0.0.1]:47684 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFJh7-0007He-W1
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 13:13:10 -0400
Received: from quimby.gnus.org ([95.216.78.240]:33876)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFJh6-0007HP-HQ
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 13:13:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=jjQX+RvyooLYOhz5pnZ+E3IjLu8xzTP0x7w/wTfLcbE=; b=f13+gd4ZmYb97BG9ylmoQ8JUD8
 KYVc5vJ6JDM3e0rWsgO2gl0s369CeSaRSUoKueEgBPBoTRXOuOJq0SVdII0ccEs0a+cDa/gVuz8on
 GkITDwY1wWutWEeMO94CYzRUffzdPhwQ4mp0pS8z3ndIHmRKvJPCItd3KdBdXsad4ZVU=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFJgv-0002pr-Ty; Sun, 15 Aug 2021 19:13:02 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN>
 <87y292isxp.fsf@HIDDEN> <838s12ac5f.fsf@HIDDEN>
 <837dgmac13.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 19:12:55 +0200
In-Reply-To: <837dgmac13.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 15 Aug
 2021 19:49:28 +0300")
Message-ID: <87h7fqiqco.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Eli Zaretskii <eliz@HIDDEN> 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? 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, pm@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 17:09:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 13:09:23 2021
Received: from localhost ([127.0.0.1]:47676 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFJdS-0007BJ-Sz
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 13:09:23 -0400
Received: from quimby.gnus.org ([95.216.78.240]:33826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFJdR-0007B6-8n
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 13:09:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=6+C4nCobzAAIU+uE7IC49K2QFRRz5sWgUo66U5jxtrI=; b=Zx8EBtRubINpKxzYBIxAjxzoYO
 tQ2WpYoXjfwZK2a9eFvAhr/zXT4FnxJ76RPLRrA+xfXG8iRqZ4vsh+/e6Np2YzsFQ0L4qIW0r78gQ
 jgPWG2YjDLLIo+nv7Y4SSe/vgsdFm0dt9loTH75JRB3j1H/Nsp++bGaC19GTbemoRpwg=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFJdG-0002nq-KU; Sun, 15 Aug 2021 19:09:14 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN>
 <87y292isxp.fsf@HIDDEN> <835yw6absf.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 19:09:09 +0200
In-Reply-To: <835yw6absf.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 15 Aug
 2021 19:54:40 +0300")
Message-ID: <87lf52iqiy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: > Actually, I think we
 need the details. When the user changes the > page, which event do we get?
 focus-out or focus-in? or both one after > the other? Let's see... when
 switching
 to the other desktop, we get a focus out. When switching back again, we seem
 to get a focus in, then an out, and then an in again. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, rudalics@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

> Actually, I think we need the details.  When the user changes the
> page, which event do we get? focus-out or focus-in? or both one after
> the other?

Let's see...  when switching to the other desktop, we get a focus out.
When switching back again, we seem to get a focus in, then an out, and
then an in again.

Just opening a frame normally gives me an in, out and in again, so the
extra out/in may be just something the window manager always does.

> If we get the focus-out event, what is the frame's focus_state at that
> point?

Haven't looked yet.

Eli Zaretskii <eliz@HIDDEN> writes:

> And also, which frame is being reported as receiving the event?

There's only a single Emacs frame in my tests.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 17:03:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 13:03:19 2021
Received: from localhost ([127.0.0.1]:47672 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFJXb-00072V-7X
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 13:03:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37166)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFJXZ-00072G-Ht
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 13:03:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51620)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFJXT-0001ce-SP; Sun, 15 Aug 2021 13:03:11 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4729
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFJXT-0007Rf-0V; Sun, 15 Aug 2021 13:03:11 -0400
Date: Sun, 15 Aug 2021 20:03:02 +0300
Message-Id: <834kbqabeh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: larsi@HIDDEN
In-Reply-To: <835yw6absf.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 15
 Aug 2021 19:54:40 +0300)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN> <87y292isxp.fsf@HIDDEN>
 <835yw6absf.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, pm@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 15 Aug 2021 19:54:40 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 49997 <at> debbugs.gnu.org, pm@HIDDEN
> 
> Actually, I think we need the details.  When the user changes the
> page, which event do we get? focus-out or focus-in? or both one after
> the other?
> 
> If we get the focus-out event, what is the frame's focus_state at that
> point?

And also, which frame is being reported as receiving the event?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 16:54:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 12:54:56 2021
Received: from localhost ([127.0.0.1]:47648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFJPU-0006mw-Fx
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:54:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35984)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFJPS-0006mh-EE
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:54:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51326)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFJPM-0004P4-OP; Sun, 15 Aug 2021 12:54:48 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4213
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFJPM-0005np-BS; Sun, 15 Aug 2021 12:54:48 -0400
Date: Sun, 15 Aug 2021 19:54:40 +0300
Message-Id: <835yw6absf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87y292isxp.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sun, 
 15 Aug 2021 18:17:06 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN> <87y292isxp.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, rudalics@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: pm@HIDDEN,  49997 <at> debbugs.gnu.org,  rudalics@HIDDEN
> 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.

Actually, I think we need the details.  When the user changes the
page, which event do we get? focus-out or focus-in? or both one after
the other?

If we get the focus-out event, what is the frame's focus_state at that
point?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 16:49:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 12:49:44 2021
Received: from localhost ([127.0.0.1]:47639 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFJKS-0006dw-0N
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:49:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35514)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFJKQ-0006df-CK
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:49:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51204)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFJKK-000107-Uc; Sun, 15 Aug 2021 12:49:36 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3894
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFJKK-0005P9-Dg; Sun, 15 Aug 2021 12:49:36 -0400
Date: Sun, 15 Aug 2021 19:49:28 +0300
Message-Id: <837dgmac13.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: larsi@HIDDEN
In-Reply-To: <838s12ac5f.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 15
 Aug 2021 19:46:52 +0300)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN> <87y292isxp.fsf@HIDDEN>
 <838s12ac5f.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org, pm@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sun, 15 Aug 2021 19:46:52 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 49997 <at> debbugs.gnu.org, pm@HIDDEN
> 
> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 16:47:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 12:47:15 2021
Received: from localhost ([127.0.0.1]:47634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFJI3-0006Zl-9H
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:47:15 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35292)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFJHx-0006ZO-2m
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:47:13 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51168)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFJHq-0007pw-4c; Sun, 15 Aug 2021 12:47:02 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3728
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFJHp-0005Ef-OA; Sun, 15 Aug 2021 12:47:02 -0400
Date: Sun, 15 Aug 2021 19:46:52 +0300
Message-Id: <838s12ac5f.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87y292isxp.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sun, 
 15 Aug 2021 18:17:06 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN> <87y292isxp.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, rudalics@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: pm@HIDDEN,  49997 <at> debbugs.gnu.org,  rudalics@HIDDEN
> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 16:17:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 12:17:31 2021
Received: from localhost ([127.0.0.1]:47614 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFIpC-0003ZT-Tj
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:17:31 -0400
Received: from quimby.gnus.org ([95.216.78.240]:33388)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFIp6-0003Z9-H1
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:17:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=fzBzcfuQGYCmClDX3gibWqwdCktHWnnDSkUdEyIqeEg=; b=ntJVby8By80FCR0sBXKNGi8NsH
 o6qBf4Mvovn20LV8fYan0zgMx+LD1gluevFPfHpKVjQiX6LHOGnPMPoEudLE+xF0HvObE/T/nADJ7
 8vTzwYp3XX5yCbF50yUQxbZw5emFGMhgQfSMh9GGPoLP81IfKWMPU+mezmUP7zgforJQ=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFIov-0002Kr-FE; Sun, 15 Aug 2021 18:17:13 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 18:17:06 +0200
In-Reply-To: <83bl5yahta.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 15 Aug
 2021 17:44:33 +0300")
Message-ID: <87y292isxp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  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: 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, rudalics@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 15:00:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 11:00:12 2021
Received: from localhost ([127.0.0.1]:47588 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFHcN-0001eK-LB
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 11:00:12 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60956)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFHcH-0001cC-6J
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 11:00:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=ESi7iLeSG5GhHf8caRutNvi6OsEex/sRSa1UyJRBE6U=; b=kXGsxbg7faIuKAUCC9qfsW+E2+
 qQz5oi/l1O2lTaBT1Bhrc7MG7pRGSTwyWn6JJ50anOqk3gYSNsBTxp6jaFhwzED8F1vR/iUHel++V
 fdZZDPCzxCfaYvV+sQVvBzhkIsCE0k15hKMhntdKpuwOuMieSHrCqb8ieHIRWsXYtVpE=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFHc5-0001Sd-Vt; Sun, 15 Aug 2021 16:59:54 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
 <87a6likc5a.fsf@HIDDEN> <83bl5yahta.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 16:59:47 +0200
In-Reply-To: <83bl5yahta.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 15 Aug
 2021 17:44:33 +0300")
Message-ID: <874kbqkb30.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Eli Zaretskii <eliz@HIDDEN> writes: > The OP said this
 happens
 even when he switches to a page without the > Emacs frame, so I'm not sure
 how the position could change? And if > iconified frames are somehow involved, 
 we could perhaps lo [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, rudalics@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

> The OP said this happens even when he switches to a page without the
> Emacs frame, so I'm not sure how the position could change?  And if
> iconified frames are somehow involved, we could perhaps look at
> FRAME_ICONIFIED_P and/or the FocusIn/FocuseOut events?

I poked around some more, and

	      if (!FRAME_TOOLTIP_P (f)
		  && (old_left != f->left_pos || old_top != f->top_pos))
		{
		  inev.ie.kind = MOVE_FRAME_EVENT;
		  XSETFRAME (inev.ie.frame_or_window, f);
		}

is not involved here, and neither is

    case MOVE_FRAME_EVENT:
      /* Make an event (move-frame (FRAME)).  */
      return list2 (Qmove_frame, list1 (event->frame_or_window));

So we're getting the Qmove_frame from somewhere else?

Perhaps I should fire up gdb to trace this...

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 14:44:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 10:44:51 2021
Received: from localhost ([127.0.0.1]:47584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFHNb-00019v-8U
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 10:44:51 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFHNZ-00019j-GP
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 10:44:50 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48654)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFHNT-0001Rq-C0; Sun, 15 Aug 2021 10:44:43 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4150
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFHNS-0006Km-Uq; Sun, 15 Aug 2021 10:44:43 -0400
Date: Sun, 15 Aug 2021 17:44:33 +0300
Message-Id: <83bl5yahta.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87a6likc5a.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sun, 
 15 Aug 2021 16:36:49 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN> <87a6likc5a.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, rudalics@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: pm@HIDDEN,  49997 <at> debbugs.gnu.org, Martin Rudalics <rudalics@HIDDEN>
> Date: Sun, 15 Aug 2021 16:36:49 +0200
> 
> 	      if (!FRAME_TOOLTIP_P (f)
> 		  && (old_left != f->left_pos || old_top != f->top_pos))
> 		{
> 		  inev.ie.kind = MOVE_FRAME_EVENT;
> 		  XSETFRAME (inev.ie.frame_or_window, f);
> 		}
> 	    }
> 
> So it's purely based on whether the window manager told is that the
> position changed -- which I guess it sort of does?  When I move to a
> different virtual desktop, it shows me all the iconified frames, and
> that's probably where this comes from?

The OP said this happens even when he switches to a page without the
Emacs frame, so I'm not sure how the position could change?  And if
iconified frames are somehow involved, we could perhaps look at
FRAME_ICONIFIED_P and/or the FocusIn/FocuseOut events?

(Full disclosure: I know almost nothing about X events.)

> I've added Martin to the CCs; perhaps he has some insights here.

Good idea.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 14:37:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 10:37:02 2021
Received: from localhost ([127.0.0.1]:47580 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFHG2-0000yv-DT
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 10:37:02 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60702)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFHG1-0000yR-Dl
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 10:37:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=JgEzFiRNFWTBOZtJ15AzGT2cHKl2Svb3sPW0ooQej5I=; b=QNSUBPblYSuyvyy7tPavrq0In1
 58ycbniRzzXbaD0vjxPHxDpvnfEq8ynVqITQP1BAJLPt1nEKhR+shG4AwmdazTubbiTDafz0rd5Ai
 cQ/9e+ZJuLN820O+Nq8W/xq8rrFfRA8IKH1Ag0IvnH1H5V1+dbX4kfEPc57w5Ial71kw=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFHFq-0001Gc-C6; Sun, 15 Aug 2021 16:36:54 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN> <83eeauaihs.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 16:36:49 +0200
In-Reply-To: <83eeauaihs.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 15 Aug
 2021 17:29:51 +0300")
Message-ID: <87a6likc5a.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Eli Zaretskii <eliz@HIDDEN> writes: > The code you show is
 in keyboard.c, where we interpret the events > we've received. To see whether
 we can distinguish between these > events and "real" move-frame events, we
 need to look in xterm.c, [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, Martin Rudalics <rudalics@HIDDEN>, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

> The code you show is in keyboard.c, where we interpret the events
> we've received.  To see whether we can distinguish between these
> events and "real" move-frame events, we need to look in xterm.c, where
> the events come in from the window-system.  Maybe they are different
> in their raw form?

Ah, I see.  Right, this is in handle_one_xevent, where we apparently
synthesise the MOVE_FRAME_EVENT:

	      if (!FRAME_TOOLTIP_P (f)
		  && (old_left != f->left_pos || old_top != f->top_pos))
		{
		  inev.ie.kind = MOVE_FRAME_EVENT;
		  XSETFRAME (inev.ie.frame_or_window, f);
		}
	    }

So it's purely based on whether the window manager told is that the
position changed -- which I guess it sort of does?  When I move to a
different virtual desktop, it shows me all the iconified frames, and
that's probably where this comes from?

This is in:

    case ConfigureNotify:

that case in itself is almost 200 lines long...

I've added Martin to the CCs; perhaps he has some insights here.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 14:30:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 10:30:07 2021
Received: from localhost ([127.0.0.1]:47572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFH9K-0007An-W0
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 10:30:07 -0400
Received: from eggs.gnu.org ([209.51.188.92]:48004)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mFH9I-00074N-NC
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 10:30:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48502)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mFH9C-0008SV-Tx; Sun, 15 Aug 2021 10:29:58 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3247
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mFH9C-0004Og-GO; Sun, 15 Aug 2021 10:29:58 -0400
Date: Sun, 15 Aug 2021 17:29:51 +0300
Message-Id: <83eeauaihs.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87sfzakczt.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sun, 
 15 Aug 2021 16:18:30 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
 <87sfzakczt.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: pm@HIDDEN, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: Peter Münster <pm@HIDDEN>,  49997 <at> debbugs.gnu.org
> Date: Sun, 15 Aug 2021 16:18:30 +0200
> 
> 16:12:06 starting (move-frame (#<frame ba.el - GNU Emacs at elva 0x55dd37bbcea0>))  backtrace-to-string()
>   internal-timer-start-idle((move-frame (#<frame GNU Emacs at elva 0x55dd37bbcea0>)))
>   read-event(nil nil 0.001)
> 
> So we're getting a move-frame event so this is being triggered, I guess?
> 
>       if (!end_time)
> 	timer_stop_idle ();
> 
> I guess the question then is...  can we distinguish between real
> move-frame events and these virtual desktop things?  I'm guessing not:
> 
>     case MOVE_FRAME_EVENT:
>       /* Make an event (move-frame (FRAME)).  */
>       return list2 (Qmove_frame, list1 (event->frame_or_window));
> 
> So the window manager is sending us a MOVE_FRAME_EVENT here.

The code you show is in keyboard.c, where we interpret the events
we've received.  To see whether we can distinguish between these
events and "real" move-frame events, we need to look in xterm.c, where
the events come in from the window-system.  Maybe they are different
in their raw form?

> Then the question becomes: Should one of these events stop Emacs idleness?

If you move the frame, I think the answer is yes.  But if this problem
is really very annoying, and we cannot distinguish between these
pseudo-moves and real moves, we could perhaps have a variable to
control whether this event stops idleness,so people could decide
what's more important for them?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 14:18:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 10:18:43 2021
Received: from localhost ([127.0.0.1]:47535 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFGyI-0006kt-UP
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 10:18:43 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60278)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFGyH-0006kd-Gd
 for 49997 <at> debbugs.gnu.org; Sun, 15 Aug 2021 10:18:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=bXMOLzYkfkb+yAMiq+d4Ie1OxR2sdwjEb7Zb/UQbPtg=; b=cowRtYndZusZ2o8LBqE257KlFX
 o4zGWz2TfyIuC8IC1kJluPW8p/mUX3kxrGoO+XrCPBmOZPmCjdod+XWasRzODpbXwposU4nWLSL2T
 dNkb7/gSh2yHKIxVhzxf7WwiJFW1wxGtBbdMdKc4u6pP+TlR755hZoM7ez5xbC2o/XYk=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFGy6-00019c-Hd; Sun, 15 Aug 2021 16:18:34 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN> <83tujwdwe0.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 16:18:30 +0200
In-Reply-To: <83tujwdwe0.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 11 Aug
 2021 15:00:07 +0300")
Message-ID: <87sfzakczt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: > 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. It seems like Emacs is woken up from
 read_event_from_main_queue...
 so by instrumenting that a bit, and then changing virtual desktops... 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: Peter =?utf-8?Q?M=C3=BCnster?= <pm@HIDDEN>, 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

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

It seems like Emacs is woken up from read_event_from_main_queue...  so
by instrumenting that a bit, and then changing virtual desktops...

Aha!

16:12:06 starting (move-frame (#<frame ba.el - GNU Emacs at elva 0x55dd37bbcea0>))  backtrace-to-string()
  internal-timer-start-idle((move-frame (#<frame GNU Emacs at elva 0x55dd37bbcea0>)))
  read-event(nil nil 0.001)

So we're getting a move-frame event so this is being triggered, I guess?

      if (!end_time)
	timer_stop_idle ();

I guess the question then is...  can we distinguish between real
move-frame events and these virtual desktop things?  I'm guessing not:

    case MOVE_FRAME_EVENT:
      /* Make an event (move-frame (FRAME)).  */
      return list2 (Qmove_frame, list1 (event->frame_or_window));

So the window manager is sending us a MOVE_FRAME_EVENT here.

Then the question becomes: Should one of these events stop Emacs idleness?

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 11 Aug 2021 12:00:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 11 08:00:00 2021
Received: from localhost ([127.0.0.1]:33694 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mDmtr-0008Lv-VI
	for submit <at> debbugs.gnu.org; Wed, 11 Aug 2021 08:00:00 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mDmtr-0008Li-2s
 for 49997 <at> debbugs.gnu.org; Wed, 11 Aug 2021 07:59:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55810)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mDmtl-0006cM-BF; Wed, 11 Aug 2021 07:59:53 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4066
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mDmtk-0003UM-T5; Wed, 11 Aug 2021 07:59:53 -0400
Date: Wed, 11 Aug 2021 15:00:07 +0300
Message-Id: <83tujwdwe0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Peter =?iso-8859-1?Q?M=FCnster?= <pm@HIDDEN>
In-Reply-To: <87eeb0mkxa.fsf@HIDDEN> (message from Peter
 =?iso-8859-1?Q?M=FCnster?= on Wed, 11 Aug 2021 10:42:57 +0200)
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Peter Münster <pm@HIDDEN>
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.
Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 49997 <at> debbugs.gnu.org:


Received: (at 49997) by debbugs.gnu.org; 11 Aug 2021 11:32:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 11 07:32:59 2021
Received: from localhost ([127.0.0.1]:33614 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mDmTj-0005L7-89
	for submit <at> debbugs.gnu.org; Wed, 11 Aug 2021 07:32:59 -0400
Received: from quimby.gnus.org ([95.216.78.240]:57196)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mDmTg-0005Gj-Uo
 for 49997 <at> debbugs.gnu.org; Wed, 11 Aug 2021 07:32:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=Q0OawJGiyU7smygHoR2Otz94+py1UXtAW1vmEar005U=; b=oMIRJB8g8Odhp/r2uHoKHQVHHC
 JGwzr7c/is5yVlLbBdYIK7ZYkwcKjSU5N/TealOhNqwFLb6Ctpjfel0lzULkBXXyKDgNR9nEAp90Q
 0Zb4y+Qledt2XljWrfzDCgR5MgRCNg9bAhMVQjJLTLRVJXHFjm8oLv177+v97jRDhfMI=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mDmTW-0007EW-7a; Wed, 11 Aug 2021 13:32:50 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Peter =?utf-8?Q?M=C3=BCnster?= <pm@HIDDEN>
Subject: Re: bug#49997: 27.2; idle-time reset when switching desktop-page
References: <87eeb0mkxa.fsf@HIDDEN>
Date: Wed, 11 Aug 2021 13:32:45 +0200
In-Reply-To: <87eeb0mkxa.fsf@HIDDEN> ("Peter =?utf-8?Q?M=C3=BCnster=22's?=
 message of "Wed, 11 Aug 2021 10:42:57 +0200")
Message-ID: <87h7fwtdwi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Peter Münster <pm@HIDDEN> writes: > 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-c [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49997
Cc: 49997 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Peter M=C3=BCnster <pm@HIDDEN> writes:

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

I can reproduce this under Gnome with:

(run-at-time 1 1 (lambda ()
		   (insert (format-time-string "%H:%M:%S") " "
                   (format "%s\n" (current-idle-time)))))

and then switching to another virtual desktop.

So I guess there's a notification Emacs receives that resets the idle
time?  Does anybody happen to know what notification this could be?

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Aug 2021 08:43:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 11 04:43:08 2021
Received: from localhost ([127.0.0.1]:33368 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mDjpM-0004rV-05
	for submit <at> debbugs.gnu.org; Wed, 11 Aug 2021 04:43:08 -0400
Received: from lists.gnu.org ([209.51.188.17]:56018)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pm@HIDDEN>) id 1mDjpI-0004rK-Ku
 for submit <at> debbugs.gnu.org; Wed, 11 Aug 2021 04:43:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37504)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pm@HIDDEN>) id 1mDjpI-0001la-12
 for bug-gnu-emacs@HIDDEN; Wed, 11 Aug 2021 04:43:04 -0400
Received: from server.a16n.net ([178.33.238.77]:36310)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pm@HIDDEN>) id 1mDjpF-0000Ml-L3
 for bug-gnu-emacs@HIDDEN; Wed, 11 Aug 2021 04:43:03 -0400
Received: from ws.localdomain (arennes-662-1-84-172.w2-14.abo.wanadoo.fr
 [2.14.50.172])
 by server.a16n.net (Postfix) with ESMTPSA id AEB1943E054E
 for <bug-gnu-emacs@HIDDEN>; Wed, 11 Aug 2021 10:42:58 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n;
 t=1628671378; bh=z4pimNvZIfcV7loBiA4Jj6Cgxz6uNmEEErIA7sflv7E=;
 h=From:To:Subject:Date;
 b=LJIE2ZlHlX03aoPpAotbRMDjPXspnGEusTcAhIfKXBz7gJtNvzDik+A4FBoPq3dLR
 VSNZoZ4tPZjc1Cxna0GD1EqTptC7VRZ76Nwfsm4sWnN2VyTXBhnmXtbHDGoUhjfgcZ
 XPetVcUnmGMES4YbNLTS7UPbZIEMglTsmI7ryZiIUYAXoGH27oHDTA73TS/VlhOSeC
 4ELeIqbJn7kFVte/yU2XLh+8lrybJzwPppet6OCs3r6LWU87InX+bkm34GJjT9m7SH
 CqYb3Db/EelxjG+sJ5KRPvEQdRm6yRl0TmecRJFQGm7HLbEFbV381O++UYuTkrYL9B
 taVLjcm1s4VPA==
Received: by ws.localdomain (Postfix, from userid 1000)
 id D1F2D74235E; Wed, 11 Aug 2021 10:42:57 +0200 (CEST)
From: =?utf-8?Q?Peter_M=C3=BCnster?= <pm@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.2; idle-time reset when switching desktop-page
Date: Wed, 11 Aug 2021 10:42:57 +0200
Message-ID: <87eeb0mkxa.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=178.33.238.77; envelope-from=pm@HIDDEN;
 helo=server.a16n.net
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello,

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?

TIA for any hints.



In GNU Emacs 27.2 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: openSUSE Leap 15.2

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Configured using:
 'configure --disable-build-details --with-pop --without-hesiod
 --with-gameuser=:games --with-kerberos --with-kerberos5
 --with-file-notification=inotify --with-modules --enable-autodepend
 --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
 --datadir=/usr/share --localstatedir=/var --sharedstatedir=/var/lib
 --libexecdir=/usr/lib
 --enable-locallisppath=/usr/share/emacs/27.2/site-lisp:/usr/share/emacs/site-lisp
 --with-x --with-xim --with-sound --with-xpm --with-jpeg --with-tiff
 --with-gif --with-png --with-rsvg --with-dbus --with-xft --without-gpm
 --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 --x-includes=/usr/include --x-libraries=/usr/lib64 --with-libotf
 --with-m17n-flt --with-cairo --with-xwidgets --build=x86_64-suse-linux
 --with-dumping=pdumper 'CFLAGS=-fmessage-length=0 -grecord-gcc-switches
 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
 -fasynchronous-unwind-tables -fstack-clash-protection -g -D_GNU_SOURCE
 -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS
 -pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label
 -fno-optimize-sibling-calls -fno-PIE -DSYSTEM_PURESIZE_EXTRA=55000
 -DSITELOAD_PURESIZE_EXTRA=10000 -DPDMP_BASE='\''"emacs-gtk"'\'''
 LDFLAGS=-Wl,-O2'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LC_CTYPE: en_GB.utf8
  value of $LC_MESSAGES: en_GB.utf8
  value of $LC_NUMERIC: POSIX
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils pp server time-date
subr-x cl-loaddefs cl-lib delsel lpr easy-mmode pcase tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting xwidget-internal cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 45431 8593)
 (symbols 48 6077 1)
 (strings 32 16018 2520)
 (string-bytes 1 520413)
 (vectors 16 9497)
 (vector-slots 8 127010 11274)
 (floats 8 21 52)
 (intervals 56 279 0)
 (buffers 1000 14))

-- 
           Peter




Acknowledgement sent to Peter Münster <pm@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#49997; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 22 Aug 2021 21:45:01 UTC

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