Skip to content

pointer_input: implement edge barrier between screens

Yifan Zhu requested to merge work/fanzhuyifan/edge into master

Allow users to configure a virtual edge barrier between screens. The pointer will only cross over to the other screen after the distance travelled surpasses edgeBarrier.

BUG: 416570 BUG: 451744

  • set default value to 100, default to be on
  • during interactive move resize, barrier x 1.5
  • at edges that trigger, barrier x 2
  • at corners (15px), barrier = 2000
  • Only one barrier size is configurable, and corners can be toggled on and off (default to on)

Settings are in Mouse and Touchpad -> Edge Barrier

I also included the patch for enabling creation of edges between screens (BUG: 351175) to facilitate testing. I am happy to discuss and get approval for the two patches individually.

For me auto-hide/dodge windows panels between two screens seem to work pretty well with the two patches.

plasma-desktop!2036 (closed) fixes dodge-windows panel erroneously dodging full screen windows on the neighboring screen.

@teams/usability The distance is configurable in window management->window behavior->movement->edge barrier.

Note: only works on wayland, does not work on X11.

Demo video

no_reflect

Note: To get a better feel of the UX, I would recommend compiling and running this. This works better with !5194:

reflect

Rationale

Background and problem

In today's world, multi-screen setups are becoming more and more common. Many important UI elements exist near screen edges -- scroll bars, auto-hidden panels, close buttons, to name a few. However, currently when aiming for screen edges, it is very easy to overshoot and move to the adjacent screen.

Currently auto-hide and dodge-windows panels are disabled on edges shared between screens. This decreases their consistency and usability in dynamic multi-monitor setups, where users rearrange their displays so that panels not on a shared edge may be suddenly moved to a shared edge. Having them change their behavior and always show is annoying. This is also a feature requested by many users in 351175.

Proposed solution

Add a "soft" barrier between screen edges, designed to be enabled by default. The barrier is soft in that there is no hard speed threshold needed to cross. This design seeks to make the edge barrier minimally disruptive during normal movement of cursor between screens, while enhancing the usability of UI elements near screen edges. In particular, auto-hide panels on shared edges will become usable.

Potential problems

Having something that impedes cursor movement might be a nuisance to some users. The "soft" nature of the barrier hopefully solves most of that, and a small configured default value (e.g., 25), can make the barrier unnoticeable during normal usage.

Edited by Yifan Zhu

Merge request reports