GNU bug report logs - #17439
24.3.50; run-with-idle-timer runs on focus-out

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Thu, 8 May 2014 20:56:01 UTC

Severity: important

Found in version 24.3.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 17439 <at> debbugs.gnu.org
Subject: bug#17439: 24.3.50; run-with-idle-timer runs on focus-out
Date: Fri, 09 May 2014 09:28:21 +0300
> From: Juri Linkov <juri <at> jurta.org>
> 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 #<frame emacs <at> localhost 0x1121908>)
> (focus-out #<frame emacs <at> localhost 0x1121908>)
> 
> 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?




This bug report was last modified 11 years and 23 days ago.

Previous Next


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