- Should test `!= 0`, not `> 0`; can scroll in either direction
- Test both vertical and horizontal
- Use `value120` scroll if present (in which case, discrete is 0)
I guess events should really have both line and pixel scroll, since some
widgets want to use the pixel scroll values for input devices that have
both? But I guess winit and Iced both need to be changed for that...
Ideally pointer should be seperate from touch, but this should match how
Iced handles input in normal winit windows.
d475ae5b45/winit/src/window/state.rs (L165-L170)
With this, touch input for applets seems to work as expected in general.
This reverts commit 15547dec8f83af1ea6dbed1964302400fc17c257 from
https://github.com/pop-os/iced/pull/227.
This is causing issues in `cosmic-workspaces`. It seems I didn't test it
properly outside the examples here... and this misinterpreted exactly
what the (undocumented) `viewport` argument means (Iced's `image` widget also
needed a fix to handle viewports properly since our fork:
https://github.com/iced-rs/iced/pull/2752).
It should be possible to fix, but revert for now.
Test scrolling. Single color buffers in `sctk_subsurface` aren't good
for comparing it, and `sctk_subsurface_gst` isn't working on latest gst
with explicit sync (and AppSync isn't accepting the dmabuf when I try to
modify it.)
Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/143.
The way some events are converted to `WindowEvent`s in `pointer_frame`
but motion is handled in `SctkEvent::process` seems a little cluttered
at the moment, I guess from how this code was ported to be part of
iced-winit instead of separate. But as I understand, the code handling
`PointerEventKind::Enter` in `SctkEvent::enter` wasn't being called, so
that can be replaced with the new code here that sets the logical cursor
position.
This adds a padding field to the scrollbar, which adds padding at the start and end of scrollbars, without affecting the scrollable. This enables the scrollable to use the full height/width of a container where it would otherwise be visually restricted by scrollbar placement (e.g. due to rounded corners).
Also adds methods for changing scrollbar/scroller width, allowing to match defaults to upstream, while making required changes in libcosmic.
`place_above` moves the subsurface within the stack of subsurfaces, so
calling it for all previous surfaces is wrong.
We also need to use the `z` from `view_subsurfaces` if this is called
before `attach_and_commit`, or an old value will be used.