Skip to content

kwin/effects: add reflect cursor plugin

Yifan Zhu requested to merge work/fanzhuyifan/reflect-cursor into master

This plugin reflects the cursor near screen edges to make it more visible.

Moved from kwin!5194 (closed). Depends on kwin!5962 (merged) for some previously uninstalled headers.

Works for arbitrary cursor shapes, and on multiscreen setups it reflects the cursor near the edges of every screen.

@teams/vdg

reflectcursor

(the click effect in the video is a separate thing, it is used to demonstrate the hotspot is still accurate after reflection)

Rationale

Background and problem

Many important UI elements exist near screen edges -- scroll bars, auto-hidden panels, close buttons, to name a few. However, currently the cursor can be largely hidden when used near these screen edges. E.g., when using a standard right-handed cursor near the right and bottom screen edges, only a thin line or tip is visible. This makes it harder to accurately locate and move the cursor in such circumstances.

Proposed solution

Add a new effect that reflects the cursor near screen edges to make most of it visible, while making its hotspot location unchanged. This is meant to be enabled disabled by default.

Potential drawbacks

Edit: Felix raised the excellent point that not all apps correctly hide the cursor, and some users hide the cursor behind screen edges when using these apps. Enabling this would make that impossible in single-monitor settings. Currently this does correctly work with apps that hide the cursor though, like konsole when typing, even when the cursor has been reflected by the effect.

This is something quite new, and to the best of my knowledge, other OSes like mac and windows don't offer such a feature. So users might find this feature very unexpected. My hope is that the vast majority of users would find this feature useful after some time. Also, since this only triggers near edges, it shouldn't be disruptive to normal workflows. However, I don't have a good sense of such things and expertise in this area is welcome.

Edited by Yifan Zhu

Merge request reports

Loading