conformal / spectrwm

A small dynamic tiling window manager for X11.
ISC License
1.33k stars 97 forks source link

Request: Pointer follows Focus #57

Closed egan closed 10 years ago

egan commented 10 years ago

This is a feature I grew quite accustomed to in xmonad.

Essentially, when window (or screen) focus is changed via the keyboard, the mouse cursor is warped to the location of the focus. In xmonad this was configurable, but a reasonable default IMO is to warp the pointer to the center of the window. This way bumping the mouse/trackpad will not change focus as it would if it were warped to a corner.

As it is, the focus follows pointer is annoying when using a combination of keyboard and cursor focus. When focused in a window where the cursor isn't, if you want to change focus to where the cursor IS you must first leave the window and then reënter it. Even if you don't use a hybrid of cursor and keyboard focus selection, changing workspaces (which cannot be done via the cursor) will still usually result in a mismatch between the focus and the cursor position.

LordReg commented 10 years ago

IMO, a more elegant solution for trackpad bumping issues (e.g. when using an off-centered trackpad): https://wiki.archlinux.org/index.php/Touchpad_Synaptics#Disable_trackpad_while_typing

Also, it's unnecessary to move the pointer out of a window and re-enter to regain focus. You can simply click the window.

In any case, I created a new branch named 'warp_pointer'. Give it a try and let me know how it goes.

egan commented 10 years ago

I don't see the warp_pointer branch...

LordReg commented 10 years ago

The branch doesn't show on GitHub. You need to checkout warp_pointer inside the spectrwm git repo on your computer. e.g: git pull git checkout warp_pointer

If you are using the spectrwm-git PKGBUILD from AUR, you can just specify the branch after the source url, e.g.: source=('git://opensource.conformal.com/spectrwm.git#branch=warp_pointer'

egan commented 10 years ago

Ah, thanks. It works great, just what I wanted.

jupito commented 10 years ago

Thanks on my behalf as well, this is very useful.

LordReg commented 10 years ago

warp_pointer is now in master.