From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49997: 27.2; idle-time reset when switching desktop-page Date: Sun, 15 Aug 2021 17:29:51 +0300 Message-ID: <83eeauaihs.fsf@gnu.org> References: <87eeb0mkxa.fsf@a16n.net> <83tujwdwe0.fsf@gnu.org> <87sfzakczt.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6839"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pm@a16n.net, 49997@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 15 16:31:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFHAL-0001cf-Tc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Aug 2021 16:31:09 +0200 Original-Received: from localhost ([::1]:39202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFHAJ-0002mV-Un for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Aug 2021 10:31:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFHAE-0002mN-7m for bug-gnu-emacs@gnu.org; Sun, 15 Aug 2021 10:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFHAE-0000om-18 for bug-gnu-emacs@gnu.org; Sun, 15 Aug 2021 10:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mFHAD-00082i-UR for bug-gnu-emacs@gnu.org; Sun, 15 Aug 2021 10:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Aug 2021 14:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49997 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 49997-submit@debbugs.gnu.org id=B49997.162903780727612 (code B ref 49997); Sun, 15 Aug 2021 14:31:01 +0000 Original-Received: (at 49997) by debbugs.gnu.org; 15 Aug 2021 14:30:07 +0000 Original-Received: from localhost ([127.0.0.1]:47572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFH9K-0007An-W0 for submit@debbugs.gnu.org; Sun, 15 Aug 2021 10:30:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFH9I-00074N-NC for 49997@debbugs.gnu.org; Sun, 15 Aug 2021 10:30:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48502) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFH9C-0008SV-Tx; Sun, 15 Aug 2021 10:29:58 -0400 Original-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 ) id 1mFH9C-0004Og-GO; Sun, 15 Aug 2021 10:29:58 -0400 In-Reply-To: <87sfzakczt.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 15 Aug 2021 16:18:30 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211920 Archived-At: > From: Lars Ingebrigtsen > Cc: Peter Münster , 49997@debbugs.gnu.org > Date: Sun, 15 Aug 2021 16:18:30 +0200 > > 16:12:06 starting (move-frame (#)) backtrace-to-string() > internal-timer-start-idle((move-frame (#))) > 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?