hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
17.88k stars 752 forks source link

sessionLock: focus lock on creation based on mouse position #6658

Closed outfoxxed closed 3 days ago

outfoxxed commented 4 days ago

Describe your PR, what does it fix/add?

Causes created lock surfaces to be focused only if they would be focused by mouse movement. This makes it so on lock, the focused surface is the one the mouse is on instead of the last surface created by the locker.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Is it ready for merging, or does it need work?

outfoxxed commented 3 days ago

We should probably kick focus from the currently focused surface immediately on lock creation, then only let lock surfaces be focusable.