Commit graph

6657 commits

Author SHA1 Message Date
Ashley Wulber
e2918e0de9
wip 2026-02-03 16:45:44 -05:00
Stephan Buys
a489a6b790
iced: propagate pane drag destinations 2026-01-28 14:18:29 -05:00
Frederic Laing
1fb7e08f23
fix Wayland layer-shell protocol violation: "must ack the initial configure before attaching buffer" 2026-01-28 14:10:58 -05:00
Hendrik Hamerlinck
9b636e281b
fix: prevent crashes from SVG rendering 2026-01-28 14:10:53 -05:00
Ashley Wulber
484aa0a532
fix: layer shell surface resize typo 2026-01-28 12:01:02 -05:00
Ashley Wulber
fd2220775b
fix: skip resize if size is unchanged 2026-01-28 12:01:02 -05:00
Ian Douglas Scott
70b9736dc7
iced/winit: Add surface id to OverlapNotify events 2026-01-28 12:01:02 -05:00
Ian Douglas Scott
49f1c2250b
winit/wayland: Add action to update layer shell input zone 2026-01-28 12:01:01 -05:00
Ian Douglas Scott
ea4f704f0f
winit/wayland: input_zone for layer, instead of pointer_interactivity
This is a more general version of the same thing, at matches what is
used for popups and subsurfaces.
2026-01-28 12:01:01 -05:00
Ian Douglas Scott
20e60ffde6
winit/wayland: Allow Vec for input_zone 2026-01-28 12:01:00 -05:00
Ian Douglas Scott
621713fe15
wayland: Fix handling of discrete/value120 scroll events
- 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...
2026-01-28 12:01:00 -05:00
Ashley Wulber
329c4c0a84
fix(sctk): set_reactive on positioner if version allows 2026-01-28 12:00:33 -05:00
Ashley Wulber
7993a572b0
fix(wayland): window resize forces corner radius update 2026-01-28 11:59:57 -05:00
Ashley Wulber
bc85d82426
chore(wayland): window state handling 2026-01-28 11:59:26 -05:00
Ashley Wulber
e73bbddbca
feat(wayland): corner-radius protocol support 2026-01-27 17:17:08 -05:00
Ashley Wulber
54a69a0523
feat(wayland): shortcut inhibit 2026-01-27 17:00:24 -05:00
Ashley Wulber
8e7b7e586f
feat: subsurface reposition 2026-01-27 16:26:11 -05:00
Ashley Wulber
4eb7f9b2fe
fix(wayland popup): apply input region 2026-01-27 16:26:11 -05:00
Ian Douglas Scott
9e45bd2378
winit/sctk: Update cursor position on touch event
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.
2026-01-27 16:26:10 -05:00
Ian Douglas Scott
5924fea0b1
Revert "subsurface_widget: Handle viewport and set source rectangle"
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.
2026-01-27 16:26:10 -05:00
Ian Douglas Scott
7a1f8b3472
examples/sctk_subsurface_img: Toggle image/subsurface with key 2026-01-27 16:26:10 -05:00
Ian Douglas Scott
58f6ea3f08
subsurface_widget: Handle viewport and set source rectangle
This is needed to crop subsurface when needed, instead of rendering
overlapping other things. And to offset while scrolling.
2026-01-27 16:26:09 -05:00
Ian Douglas Scott
d0b4d0e9c9
examples: Add sctk_subsurface_img
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.)
2026-01-27 16:26:09 -05:00
Ian Douglas Scott
5865264964
examples: Update gstreamer 2026-01-27 16:26:08 -05:00
Ian Douglas Scott
e702c43f71
examples: Update sctk_subsurface_gst to compile again 2026-01-27 16:26:08 -05:00
Ashley Wulber
29b41e9776
chore(sctk): reduce severity of log messages 2026-01-27 16:20:42 -05:00
Ashley Wulber
e4f8120eed
improv(sctk): setup error handling 2026-01-27 16:20:36 -05:00
Ashley Wulber
9668aeba1f
fix: nested popup destruction 2026-01-27 16:08:23 -05:00
Ian Douglas Scott
78153e6240
fix(winit): Cleanup surface_subsurfaces on parent window removal 2026-01-27 16:08:16 -05:00
Juniper
89af847930
Remove Cargo.lock 2026-01-26 18:42:54 -05:00
Héctor Ramón Jiménez
199277921a
Implement markdown incremental code highlighting
(cherry picked from commit 4b8fc23840)
2026-01-26 18:41:29 -05:00
Jeremy Soller
3553fa2c01
Format 2026-01-26 13:11:55 -05:00
Jeremy Soller
6de3237687
support CapsLock modifiers on wayland 2026-01-26 13:11:28 -05:00
Héctor Ramón Jiménez
0b068e486e
Infinite List widget from upstream feature/list-widget-reloaded branch 2026-01-26 13:10:42 -05:00
Ashley Wulber
6829724ac0
fix: send pointer motion event for pointer enter event 2026-01-26 12:51:02 -05:00
Victoria Brekenfeld
19ff21d298
wgpu: Fix explicit nvidia device selection 2026-01-26 12:51:01 -05:00
Ashley Wulber
ad0523230e
fix: reset control flow if the loop is about to wait with nothing to do. 2026-01-26 12:50:53 -05:00
Ian Douglas Scott
53fed52405
wayland: Set cusor position on Enter events
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.
2026-01-26 12:13:32 -05:00
Vukašin Vojinović
b775402f65
feat(scrollable): add padding to ends of scrollbar
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.
2026-01-26 12:13:27 -05:00
Ian Douglas Scott
f04e237946
subsurface_widget: Use neagtive z to place below parent surface
Now uses `i32` for `z`.
2026-01-26 11:56:40 -05:00
Ian Douglas Scott
02bd5d17ef
subsurface_widget: Sort parent WlSurface, not ObjectId 2026-01-26 11:56:37 -05:00
Ian Douglas Scott
9f07d15617
subsurface_widget: Fix use of place_above
`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.
2026-01-26 11:48:15 -05:00
Ashley Wulber
5b0468e535
refactor: include virtual offset in Layout 2026-01-26 11:48:10 -05:00
Jeremy Soller
7120db60ba
Format 2026-01-26 10:14:19 -05:00
Ashley Wulber
4db71cb0e6
fix: create fractional scale for sctk subsurfaces 2026-01-23 15:39:42 -05:00
Ashley Wulber
93bc4bbd88
feat: subsurfaces 2026-01-23 15:39:35 -05:00
Adam Cosner
0f37c9922d
perf: use cached alpha mode instead of calling surface.get_capabilities every time the window is redrawn 2026-01-23 14:50:36 -05:00
Sosthène Guédon
46c745be2c
Add focus id to text editor 2026-01-23 14:50:32 -05:00
Ian Douglas Scott
49b154c048
winit/wayland: Update for toplevel-info cctk changes 2026-01-23 14:47:54 -05:00
Ian Douglas Scott
3cdcfe79db
Update cctk to latest commit 2026-01-23 14:46:29 -05:00