From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#17439: 24.3.50; run-with-idle-timer runs on focus-out Date: Sat, 10 May 2014 23:38:20 +0300 Organization: JURTA Message-ID: <87vbtd5p6u.fsf@mail.jurta.org> References: <87ha50578c.fsf@mail.jurta.org> <834n0zwjne.fsf@gnu.org> <87r442ptpb.fsf@mail.jurta.org> <83r442upj2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1399755749 17194 80.91.229.3 (10 May 2014 21:02:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 May 2014 21:02:29 +0000 (UTC) Cc: 17439@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 10 23:02:21 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 1WjEPV-0000Aw-0I for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 May 2014 23:02:21 +0200 Original-Received: from localhost ([::1]:58915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjEPU-000656-JS for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 May 2014 17:02:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjEPK-00064z-3m for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 17:02:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjEPC-0002hp-Ja for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 17:02:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjEPC-0002hl-GK for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 17:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WjEPC-0001SA-1i for bug-gnu-emacs@gnu.org; Sat, 10 May 2014 17:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 May 2014 21:02: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.13997556665461 (code B ref 17439); Sat, 10 May 2014 21:02:01 +0000 Original-Received: (at 17439) by debbugs.gnu.org; 10 May 2014 21:01:06 +0000 Original-Received: from localhost ([127.0.0.1]:58427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjEOH-0001PR-ST for submit@debbugs.gnu.org; Sat, 10 May 2014 17:01:06 -0400 Original-Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:53217 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WjEOF-0001MS-2a for 17439@debbugs.gnu.org; Sat, 10 May 2014 17:01:03 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E667330A21DBC4; Sat, 10 May 2014 14:01:00 -0700 (PDT) In-Reply-To: <83r442upj2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 May 2014 09:16:33 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) 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:88871 Archived-At: > So are you saying we should NOT ignore focus-in? If you still think > focus-in should be ignored, then I think the above description > (perhaps together with the window manager where it was observed) > should be in the comments to the code. After more testing without ignoring focus-in and with ignoring focus-out, often pressing and releasing Alt-Tab quickly generates both events focus-in and focus-out, and when having no time to show the Window List focus-in moves the mouse pointer and hides the selected window. So both events should be ignored, like `switch-frame' is already ignored when switching between Emacs frames. I'll add a comment about this. And there are more fixes necessary in avoid.el. This patch will ignore modifiers used together with mouse events: === modified file 'lisp/avoid.el' --- lisp/avoid.el 2014-01-01 07:43:34 +0000 +++ lisp/avoid.el 2014-05-10 20:36:19 +0000 @@ -347,7 +348,13 @@ (defun mouse-avoidance-ignore-p () (memq 'double modifiers) (memq 'triple modifiers) (memq 'drag modifiers) - (memq 'down modifiers))))))) + (memq 'down modifiers) + (memq 'meta modifiers) + (memq 'control modifiers) + (memq 'shift modifiers) + (memq 'hyper modifiers) + (memq 'super modifiers) + (memq 'alt modifiers))))))) (defun mouse-avoidance-banish () (if (not (mouse-avoidance-ignore-p)) And this patch fixes the customization of `mouse-avoidance-banish-position' (it can be tested by e.g. using `set-variable' on `mouse-avoidance-banish-position'): === modified file 'lisp/avoid.el' --- lisp/avoid.el 2014-01-01 07:43:34 +0000 +++ lisp/avoid.el 2014-05-10 20:36:19 +0000 @@ -129,9 +129,10 @@ (defcustom mouse-avoidance-banish-positi TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window." :group 'avoid :version "24.3" - :type '(alist :key-type symbol :value-type symbol) - :options '(frame-or-window side (side-pos integer) - top-or-bottom (top-or-bottom-pos integer))) + :type '(alist :key-type symbol :value-type (choice symbol integer)) + :options '((frame-or-window symbol) (side symbol) (side-pos integer) + (top-or-bottom symbol) (top-or-bottom-pos integer)))