https://bugs.kde.org/show_bug.cgi?id=514884

--- Comment #2 from Aaron <[email protected]> ---
After some more reading, I discovered that KWin already has an internal
implementation for pointer centering via the default Meta+F5 shortcut ("Move
Mouse to Focus"), which centers the mouse on the currently focused window. That
code path clearly has access to pointer warping, window geometry, and the
relevant input backend, so the underlying capability already exists.

Rather than pursuing a KWin script solution (which doesn't support pointer
warping, as you stated), would it be feasible to reuse that existing internal
mechanism selectively for keyboard-induced focus changes, such as when focus is
finalized via the the keyboard (i.e., Alt+Tab task switcher and "Switch to
Window" shortcuts)?

I imagine this should be gated by focus reason and not applied to all focus
changes, as in, applied:
- Only after focus changes initiated by the keyboard
- Never for pointer-driven focus (hover, click)
- Opt-in, disabled by default

Conceptually, this seems closer to “pointer centering after keyboard window
activation” than traditional mouse-follows-focus behavior, and avoids
pointer/focus feedback loops.

>From the user side, this would mirror the existing "Move Mouse to Focus"
(Meta+F5) behavior, just automatically invoked at a well-defined internal point
(e.g., task switcher/switch-to-window focus), rather than on every activation.

Would this approach be acceptable architecturally?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to