awesome icon indicating copy to clipboard operation
awesome copied to clipboard

Focus should follow cursor after workspace switch

Open ahmadsharif1 opened this issue 3 years ago • 5 comments

Output of awesome --version:

awesome v4.3 (Too long) • Compiled against Lua 5.3.3 (running with Lua 5.3) • D-Bus support: ✔ • execinfo support: ✔ • xcb-randr version: 1.6 • LGI version: 0.9.2

How to reproduce the issue:

Note where mouse is. Switch workspace. Move mouse to a different area. Switch workspace back to original. Focus will be on the window that had last focus instead of where the cursor now is.

Actual result:

Focus remains on window that last had focus in a given workspace.

Expected result:

Focus should be on the window where the mouse cursor currently is, even if we just switched to this workspace.

ahmadsharif1 avatar May 17 '22 02:05 ahmadsharif1

do you have awful.autofocus enabled or why you expect it at all?

actionless avatar Jun 30 '22 06:06 actionless

This issue is real. It's just a little harder to fix than it seems. Some people don't want the mouse to be the source of truth because they used a bunch of keybindings instead. However, we should add some knobs to make it easier to configure.

Elv13 avatar Jun 30 '22 06:06 Elv13

@Elv13 arent awful.permissions those knobs? AFAIR it have specific one for mouse-focusing on tag-switch only

actionless avatar Jun 30 '22 06:06 actionless

It could/can be done this way, yes. Can you link the code? Also, it's a balancing act, if it requires to disconnect and replace half of the handlers, that's probably not the most user friendly solution?

Elv13 avatar Jun 30 '22 06:06 Elv13

normally autofocus sets all 3 of them but he needs only one for tags:

https://github.com/awesomeWM/awesome/blob/master/lib/awful/permissions/_common.lua#L58-L62

actionless avatar Jun 30 '22 06:06 actionless