I'm using Spacemacs on MS Windows (msys2 build) and when a tooltip pops up Emacs seems to move my mouse pointer out of the way. How can I prevent this automatic movement?
1 Answer
I do not use Spacemacs, but this could be caused by mouse-avoidance-mode
. It normally moves the mouse when the cursor is nearby. So it may also apply to tooltips, I am not sure.
You can check if it is enabled with C-h v mouse-avoidance-mode. If it is not nil
, you can disable it with (mouse-avoidance-mode -1)
.
There are also several other options how the mouse is moved, see the manual. I used to set it to 'exile
, which makes the cursor automatically return.
-
-
The low-level function to move the mouse seems to be
set-mouse-position
. You can try to enable the debugger when this function is invoked and see what other function triggered it. To do so evaluate(debug-on-entry 'set-mouse-position)
. This will only work if whatever moves your mouse, uses this function, but that seems fairly likely. To disable the debugger again use(cancel-debug-on-entry 'set-mouse-position)
.– fpiperNov 11, 2019 at 15:05