bspwm icon indicating copy to clipboard operation
bspwm copied to clipboard

`focus_follows_pointer`: change focus only when pointer enters a window

Open randoragon opened this issue 2 years ago • 3 comments

The current implementation of focus_follows_pointer activates the hovered-over window every time the pointer is moving.

This is often undesirable and unintuitive for various reasons, but most notably it causes very nasty behavior in some GUI applications.

In an example below, I am hovering over the main window of a GUI application, which spawned a simple close dialog - the dialog window steals focus from the main window, but, since the pointer is moving over the main window, bspwm hands that focus back, and a deadly loop commenses. I took a short screencast to illustrate this issue, notice how quickly node_focus events ramp up: https://i.imgur.com/nmtRQXY.mp4

Fun fact: the first time I attempted the screencast, the node_focus events completely clogged up my background script that reads these events and I had to switch to tty and kill it in order to unhang my graphical session :)

For this and other reasons, I would like to see a setting which tells bspwm to only activate the hovered-over window when the pointer enters a window.
This could be done in various ways, but the simplest and most compatible one I can think of is just extending focus_follows_pointer to accept values on/true, off/false and something new like enter_only.

randoragon avatar Mar 08 '22 15:03 randoragon

pardon my dotfiles commit that referenced this issue and got displayed here, i didn't know github picks this stuff up so intrusively :/

randoragon avatar Mar 08 '22 18:03 randoragon

This is especially annoying when closing Steam. Sometimes when I close Steam, a popup will appear telling the user it's still doing some stuff like uploading cloud saves or something. The worst part is that Steam makes a sound every time that window goes in/out focus, resulting in a very loud barrage of sounds when the mouse is not above that popup window.

zjeffer avatar Apr 23 '22 19:04 zjeffer

I use Carla, just like the application OP's showing in the screencast.

For me, the biggest issue with this (which I've only encountered in Carla so far) is that after I move the mouse outside the dialogue and back, left mouse clicks are completely ignored until I move the pointer a little inside the the dialogue. (Interestingly, the side buttons on my mouse are recognised correctly in this case, so they can be used for selecting files, but not for clicking on buttons like 'Yes'.)

maxigaz avatar Apr 26 '22 09:04 maxigaz