https://bugs.kde.org/show_bug.cgi?id=514884
Bug ID: 514884
Summary: Add optional “Mouse follows focus” (pointer warp on
focus change) to complement focus-follows-mouse
Classification: Frameworks and Libraries
Product: frameworks-kwindowsystem
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: wishlist
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Background:
KWin currently supports focus-follows-mouse, but there is no built-in option to
also move the pointer automatically to the newly focused window when focus
changes via keyboard actions such as Alt+Tab, window shortcuts, or task
switcher navigation.
This feature was requested previously in Bug #37719, and was closed RESOLVED
INTENTIONAL. The rationale at the time was that programmatically moving the
pointer is undesirable and can surprise users.
Why the request should be reconsidered:
The use case for this feature has become significantly more relevant due to
modern workflows and compositor expectations:
- Many users now run hybrid workflows mixing mouse and keyboard navigation.
- Alt+Tab is significantly less usable with focus-follows-mouse because the
pointer remains on the previous window.
- Several modern compositors (e.g., Hyprland) implement this behavior by
default and it works reliably.
- On Wayland, some applications and compositors already accept pointer warping
in specific contexts (e.g., popup focus)?
Proposed behavior:
- Add an explicit, opt-in setting in KWin:
“Mouse follows focus (warp pointer on focus change)”
-When enabled:
- Focus-follows-mouse and click-to-focus remains unchanged.
- When focus changes via keyboard or programmatic means (Alt+Tab, keyboard
window switch, task switcher, activity switch, etc.), the pointer is warped to
a deterministic location (e.g., center) of the newly focused window.
This should be implemented in a way that avoids the issues described in Bug
37719:
- Only warp on focus changes initiated by keyboard or programmatic actions, not
on every mouse-enter event.
- Avoid “pointer trapping” by not warping on transient focus changes (e.g.,
tooltip hover)?
- Make it clear and reversible in System Settings.
Safety and UX:
- Make the option must be disabled by default.
Benefits:
- Restores usability of Alt+Tab in focus-follows-mouse mode (Alt+Tab is kind of
pointless with focus-follows-mouse otherwise).
- Improves hybrid workflows (mouse + keyboard) without changing default
behavior.
- Reduces reliance on third-party scripts (I don't think there are currently
any for Wayland at this time actually).
- Aligns KWin with modern compositor expectations.
--
You are receiving this mail because:
You are watching all bug changes.