Skip to content

Draft: layer-surface: Use float coordinates for geometry

Guido Günther requested to merge guidog/phoc:stepless-drag into main

Here's a very quick hack to avoid layer surfaces on drag making jumps by the outputs scale factor.

Basically a PoC to show where people using HiDPI want to poke at.

Note that there's still very a noticeable jump when the gesture gets recognized as we sync the surface's position with the touch point but as that's independent from scaling we'll fix that in a separate MR. As this visible on all scale factors it's also more important than this one.

Also animations need to use fractional coordinates as otherwise the stepping is visible when the surface folds via an animation (also independent from this one).

Easy to develop further in a nested session using:

G_MESSAGES_DEBUG=phoc-layer-shell-effects WLR_BACKENDS=wayland  _build/src/phoc -C ./phoc.ini  -E '_build/examples/layer-shell-effects -l overlay -h 150 -a left -a top -a right -w 0 -f -100 -t 0.5 -e 50'

and a phoc.ini like

mode = 360x720
scale = 4

(this is really just a lunch break hack, there's places where we don't need an fbox and also some places where we need to care about rounding)

Closes: #293

Edited by Guido Günther

Merge request reports