bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command


From: Robert Marshall
Subject: bug#47969: 28.0.50; Losing minibuffer focus in trying M-x command
Date: Sun, 2 May 2021 09:01:56 +0100

martin rudalics writes:
 >  > Patch attached.  Could you please test it, and confirm that it correctly 
 > fixes the issue?
 >  >
 >  > Cc'ing Martin, who authored most of the handle-select-window function. 
 > The recipe is upthread.
 > 
 > I don't know what to say because (1) moving the mouse to the lower
 > window does _not_ lead to typing "gnus" in that window here and (2) I'd
 > rather consider it a bug to _not_ select the lower window in that case.

Though when I've seen this bug I am not *consciously* moving the
mouse, maybe it is being accidentally jolted? Typically I was seeing
this after moving from another workspace into one containing 2 emacs
frames and immediately trying to run gnus.

> 
 > Mouse window auto-selection should mimic the behavior of clicking into
 > the lower window and clicking in that window should select it also while
 > a minibuffer dialogue goes on.  Recall that such dialogues are not modal
 > as has been constated a number of times on this list.
 > 
 > Note also that normally I have my minibuffer in a child frame and even
 > there no auto-selection takes place when the minibuffer is active
 > despite of the fact that I have set both WM focus-follows-mouse and
 > `mouse-autoselect-window'.
 > 
 > But I have no strong opinion so I leave it to Robert to propose what
 > should be done here.
 > 

It's a difficult call between 2 conflicting requirements. I note Eli's
comments but I've applied the patch and it fixes the issue for
me. There can be undesirable behaviour in the current behaviour. Take
this contrived example -

Create file bugProvoke.el in **empty** directory
containing
;;;--------
(setq mouse-autoselect-window t)
(defun dxyes (interactive)
  (beep))
;;; end of bugProvoke.el

  In that directory, emacs -Q -l bugProvoke.el
  C-x d ;; dired the directory
  C-x 2
  ESC  and move mouse into lower window
  x dxyes ;; you think you're running the dxyes function?!
  ;;; but look at the minibuffer before you type return and delete your file

don't do this in a directory which has files you value!


Robert





reply via email to

[Prev in Thread] Current Thread [Next in Thread]