From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17439: 24.3.50; run-with-idle-timer runs on focus-out Date: Fri, 09 May 2014 09:28:21 +0300 Message-ID: <834n0zwjne.fsf@gnu.org> References: <87ha50578c.fsf@mail.jurta.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1399616966 23130 80.91.229.3 (9 May 2014 06:29:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 May 2014 06:29:26 +0000 (UTC) Cc: 17439@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 09 08:29:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WieJ4-0004P1-OF for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 May 2014 08:29:18 +0200 Original-Received: from localhost ([::1]:50885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WieJ4-0006wE-5l for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 May 2014 02:29:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WieIv-0006vs-2T for bug-gnu-emacs@gnu.org; Fri, 09 May 2014 02:29:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WieIo-0004KX-Su for bug-gnu-emacs@gnu.org; Fri, 09 May 2014 02:29:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WieIo-0004KS-Ph for bug-gnu-emacs@gnu.org; Fri, 09 May 2014 02:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WieIn-00031y-SI for bug-gnu-emacs@gnu.org; Fri, 09 May 2014 02:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 May 2014 06:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17439 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17439-submit@debbugs.gnu.org id=B17439.139961689911576 (code B ref 17439); Fri, 09 May 2014 06:29:01 +0000 Original-Received: (at 17439) by debbugs.gnu.org; 9 May 2014 06:28:19 +0000 Original-Received: from localhost ([127.0.0.1]:56494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WieI6-00030d-9B for submit@debbugs.gnu.org; Fri, 09 May 2014 02:28:19 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:62300) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WieI2-00030J-21 for 17439@debbugs.gnu.org; Fri, 09 May 2014 02:28:15 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N5A00400N2L0X00@a-mtaout20.012.net.il> for 17439@debbugs.gnu.org; Fri, 09 May 2014 09:28:07 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5A0036WNAVFIB0@a-mtaout20.012.net.il>; Fri, 09 May 2014 09:28:07 +0300 (IDT) In-reply-to: <87ha50578c.fsf@mail.jurta.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88807 Archived-At: > From: Juri Linkov > Date: Thu, 08 May 2014 23:45:27 +0300 > > Some change a few months ago introduced a significant inconvenience. > After switching to another application, the focus returns back to Emacs. > It happens when using `mouse-avoidance-mode' customized to `banish'. > This mode relies on `run-with-idle-timer' that moves the mouse cursor > on a new input. This caused no problems in prior releases. > > However, now input events include a new event type `focus-out', > so the mouse cursor is moved on switching from Emacs frame > (and the new mouse cursor position puts the focus back > due to specific configuration). > > This code illustrates the problem: > > (defun test () (message "%S" last-input-event)) > (setq timer (run-with-idle-timer 0.1 t 'test)) > > On switching out it prints to *Messages*: > > (focus-in #) > (focus-out #) > > This specific problem can be fixed by this patch: Why did you add focus-in as well? Wouldn't you want the mouse moved when you are about to type?