Commit graph

6610 commits

Author SHA1 Message Date
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
Ian Douglas Scott
592f17729c
mouse_area: Fix on_drag behavior without on_release
Mouse/touch release events should end the drag even if there's not an
`on_release` callback.

This was causing https://github.com/pop-os/cosmic-comp/issues/1071.
2026-01-23 14:44:58 -05:00
Ian Douglas Scott
1f93ae8c3f
winit: Fix building without wayland feature 2026-01-23 14:39:31 -05:00
Ian Douglas Scott
a1792b681a
winit/wayland: Apply scale when creating drag surface 2026-01-23 14:36:40 -05:00
Ian Douglas Scott
b4168e69cc
Add an offset to IconSurface, so icon can be offset from custor 2026-01-23 14:34:16 -05:00
Ian Douglas Scott
ed5de12e69
runtime: Remove start_dnd
This is not currently used. And is impossible to (soundly) use, since it
requires a `Send` bound, which `State` and `Element` lack.
2026-01-23 14:07:12 -05:00
Ian Douglas Scott
bd6c04d809
Don't use Box<Arc<_>> and Arc::into_inner unnecessarily 2026-01-23 14:03:53 -05:00
Ian Douglas Scott
fde0689def
winit/wayland: Subsurfaces for drag surfaces
Use `Icon::Surface` instead of `Icon::Buffer`, so we can then create
subsurfaces of the `wl_surface`.

Using `.screenshot()` then copying to an shm buffer is suboptimal, but
this does seem overall better than with the older Iced version when a
drag surface didn't appear until a Vulkan surface could be created for
it.

This re-uses `Connection` in the platform-specific code, instead of
creating from display handle on each call.
2026-01-23 14:00:38 -05:00
Ian Douglas Scott
545ecb8a8a
Remove unused destroyed_surface_ids 2026-01-23 13:47:40 -05:00
Ashley Wulber
6cffd2f452
fix: use total_cmp where possible 2026-01-23 13:47:39 -05:00
Ian Douglas Scott
288919958e
subsurface: Add option to apply buffer transform 2026-01-23 13:47:38 -05:00
Ian Douglas Scott
e034001468
subsurface: Remove width/height arguments to Subsurface::new
In an earlier version, this took a `WlBuffer`, so the width/height
arguments were needed. But since using the same `wl_buffer` multiple
times conflicted with `release` handling we instead accept
`SubsurfaceBuffer`, which stores the same height/width.
2026-01-23 13:47:37 -05:00
Ian Douglas Scott
c7dd111ae8
subsurface: Add width/height methods to SubsuraceBuffer
This is potentially useful.

Other properties are specific to shm/dmabuf, and not meaningful in
general.
2026-01-23 13:47:34 -05:00
Ian Douglas Scott
18f0521357
subsurface_widget: Remove subsurface_ids
This was previously needed, but should be redundant now that an empty
input region is set for the subsurface. With that, the subsurface should
never get input events, so mapping them isn't needed.
2026-01-23 13:33:59 -05:00
Ian Douglas Scott
dd9576d94e
subsurface_widget: Clear subsurface list after calls to ::draw()
Otherwise the `draw` call in response to `AboutToWait` causes this list
to grow, and eventually hit errors in `sendmsg` due to too many buffered
file descriptors from creating subsurfaces.

Probably the number of places `UserInterface::draw` are called should be
cleaned up. And it shouldn't be called in `AboutToWiat` like this. Some
improvements could probably be made in upstream iced.
2026-01-23 13:33:42 -05:00
Ian Douglas Scott
c18f5f6dda
subsurface_widget: Take owned SubsurfaceBuffer
This type is an `Arc`, so there's no major benefit to using a reference,
or a `Cow` to make it generic.

Drag surfaces currently require a `'static` `Element`, so this is needed
their.
2026-01-23 13:12:06 -05:00
Ashley Wulber
dbbaa4f442
fix(winit): cleanup layer surface dnd surface 2026-01-23 13:11:54 -05:00
Ashley Wulber
8e08ceb25c
fix: convert sctk configure events to Opened and Resized 2026-01-23 11:30:54 -05:00
Ashley Wulber
39d88f2ffa
refactor: add namespace 2026-01-23 11:28:35 -05:00
Ashley Wulber
301892aaa5
feat: overlap notify 2026-01-23 11:25:32 -05:00
Ashley Wulber
6e91eabf4c
refactor: use cctk 2026-01-23 11:16:56 -05:00
Matt George
1b8a399ebd
use a variable instead of a fn for hard-coded check 2026-01-23 11:11:22 -05:00
Matt George
c984005e9b
hard-code which targets have drag_resize support
This replaces the previous check which appeared to rely on the assumption that initiating a drag_resize without a left mouse press wouldn't actually start a resize (this assumption is false on Windows).
2026-01-23 11:11:22 -05:00
Matt George
c2ad04a4da
fix: clear drag_initiated state on dbl click 2026-01-23 11:11:18 -05:00
Matt George
5ca1838a2d
fix: correct event types for windows 2026-01-23 11:09:50 -05:00
Ashley Wulber
c0473f8a91
fix: rebuild a11y tree when rebuilding widget tree 2026-01-23 11:07:45 -05:00
Ashley Wulber
eff664a035
fix: request logical size when autosizing 2026-01-23 10:51:41 -05:00
Ian Douglas Scott
db8e74b7a3
Send KeyboardEventVariant::Enter on keyboard enter
`cosmic-osd` expected this event, but it wasn't being sent. This isn't
hard to fix, unless there's some non-obvious issues that this was
commented to avoid (that is still applicable).
2026-01-23 10:25:19 -05:00
Ashley Wulber
83910ff5b0
refactor: allow apps to request to be treated as a daemon 2026-01-23 10:25:03 -05:00
Ashley Wulber
3cb4e4674e
fix: close subscriptions when exiting 2026-01-22 14:06:37 -05:00
Ashley Wulber
44ac127e8d
fix: feature gate a11y_nodes for mouse_area 2026-01-22 13:55:13 -05:00
Ashley Wulber
ea406698bd
fix: a11y nodes 2026-01-22 13:55:12 -05:00
Ashley Wulber
f1353e1ce2
fix: tree diff improvements
Search for the old child state with matching index
2026-01-22 13:55:01 -05:00
Ashley Wulber
37085bc8ec
fix: offset DnD events in scrollable 2026-01-21 15:12:43 -05:00
Ashley Wulber
4238d0ef2b
fix: avoid overwriting id when diffing children
this can interact with the named IDs, and cause state mismatches, and doesn't need to be done, because the ID will be updated by the diff method if there is a Tag match anyways.
2026-01-21 15:04:44 -05:00
Vukašin Vojinović
3992a3d4ac
fix: scrollbar width 2026-01-21 15:04:44 -05:00
Eduardo Flores
785732b90d
fix: documentation 2026-01-21 15:04:43 -05:00
Eduardo Flores
61cdb6fe1f
fix: use enable and disable methods 2026-01-21 15:04:37 -05:00
Eduardo Flores
344567dd8d
improv: expose set_blur 2026-01-21 14:58:08 -05:00
Ashley Wulber
ac9b0cd357
fix: reverse sctk scroll direction 2026-01-21 14:51:12 -05:00
Ashley Wulber
9668fd9821
refactor: apply requested size for surface after creation
This should help popups start as the correct size, and also layer surfaces
2026-01-21 14:51:09 -05:00
Ashley Wulber
cb529219ab
fix: slider rendering 2026-01-21 14:49:11 -05:00
Jeremy Soller
a926290efb
Implement fill_raw 2026-01-21 14:49:08 -05:00
Ashley Wulber
90c0aefa25
fix(sctk): reduce event spam for redraw requests 2026-01-21 14:44:51 -05:00
Ashley Wulber
175a71590a
fix: filter out events with no window id, if the window id is needed 2026-01-21 14:18:45 -05:00
Ashley Wulber
1349ef96b7
fix: log warning instead of panicing for current_monitor 2026-01-21 14:17:14 -05:00
Ashley Wulber
dcdc6c1410
refactor: disable wayland in winit shell by default 2026-01-21 14:17:05 -05:00
Ashley Wulber
16f14793c7
fix: docs 2026-01-21 14:13:39 -05:00