hyprwm / Hypr

Hypr is a tiling window manager written in modern C++.
BSD 3-Clause "New" or "Revised" License
1.1k stars 33 forks source link

New windows should gain focus #25

Closed KieranCodes closed 2 years ago

KieranCodes commented 2 years ago

Please describe the bug New windows don't get focus when the cursor is over the old window

Steps to reproduce: Set focus_when_hover=1, open a window, place the cursor on the left side of the window, open a second window on the right and the old window keeps focus because the cursor is still over it.

Expected behavior New windows should have focus regardless of cursor position

vaxerski commented 2 years ago

Can't reproduce. Windows should gain focus as per https://github.com/vaxerski/Hypr/blob/main/src/events/events.cpp#L540-L544

KieranCodes commented 2 years ago

I think the focus_when_hover overrides it. See the demo: https://odysee.com/hypr-focus-bug:c

vaxerski commented 2 years ago

focus_when_hover=0 is generally poorly done for now. I managed to reproduce the issue though on a nested Xorg session. Will look into.