Skip to content

focusfollowmouse

bakkeby edited this page Jun 25, 2023 · 1 revision

In dwm when taking certain actions like changing tags, moving a window to another tag or closing a window then the next window to receive focus will be the window that last had focus on the current view.

For some users this behaviour can be unintuitive and possibly resulting in mistakes due to the focus going to a seemingly random window.

This patch changes this default behaviour to allow the window that remains under the mouse cursor to get focus rather than looking for the window that last had focus.

This means that when the user kills or closes a window the window that ends up beneath the mouse cursor after tiles are rearranged will get the focus.

Likewise when moving between tags the window that ends up beneath the mouse cursor will be the one that has focus.

This behaviour is more intuitive as the window that gets focus will always be the one under the mouse cursor.

Similarly to the warp patch if the user let the cursor rest on the bar then dwm will fall back to selecting the window that last had focus as normal.

Download

Clone this wiki locally