Commit graph

327 commits

Author SHA1 Message Date
Ian Douglas Scott
0375f28bb2 Fix a few build warnings 2025-08-22 13:11:32 -07:00
Ian Douglas Scott
30ca652b1e Update cctk
Includes https://github.com/pop-os/cosmic-protocols/pull/62.
2025-06-25 17:54:18 -07:00
Ian Douglas Scott
2f8f689cfd Update rustix to 1.x
We have both in the dependency tree now, so may as well update here.
2025-06-12 13:02:54 -07:00
Ian Douglas Scott
d62ff0101d Run cargo update
Should include https://github.com/pop-os/iced/pull/229.
2025-06-12 13:02:54 -07:00
Ian Douglas Scott
3519d22dbd Fix building with mock-backend 2025-06-04 10:10:07 -07:00
Ian Douglas Scott
6d86762152 Define Workspaces and Toplevels structs
This way methods can be called while other parts of `App` are mutably
borrowed.
2025-06-04 10:10:07 -07:00
Ian Douglas Scott
20b694386d Drop capture received from backend if it no longer matches filter 2025-06-04 10:10:07 -07:00
Ian Douglas Scott
5351feb0ce Drop CaptureImages that don't match new capture filter 2025-06-04 10:10:07 -07:00
Ian Douglas Scott
a863e8f7d6 Helper methods on CatpureFilter for matching
Could be prettier, but want some way to check this in multiple places.
2025-06-04 10:10:07 -07:00
Ian Douglas Scott
6fd237ac39 row_col_toplevel_layout: fix handling of spacing / scaling
Spacing shouldn't be multiplied by the scale factor. It should be added
seperately.
2025-05-29 19:31:01 -07:00
Ian Douglas Scott
fcd8fa4336 size_cross_nth: Allocate space for widget out of remaining space 2025-05-29 19:31:01 -07:00
Ian Douglas Scott
4eac385992 two_row_col_toplevel_layout: Fix cross axis (vertical) spacing
Fixes two row layouts being cut off at the bottom.
2025-05-29 19:31:01 -07:00
Ian Douglas Scott
31f45648ca Update to zbus 5.x 2025-05-23 09:46:33 -07:00
Ian Douglas Scott
8a9b9ea614 Use modifiers from image-copy dmabuf_format, ignoring feedback
Default feedback only include primary GPU, so the previous version of
this prevents the use of explicit modifiers from the non-default GPU.

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/268
or something similar will hopefully improve this at some point...

But we can presumably assume `dmabuf_format` will only include formats
valid to create a dmabuf `wl_buffer` from.
2025-05-19 13:11:30 -07:00
Ian Douglas Scott
509e572e8e Remove currently unused node field of Buffer 2025-05-19 13:11:30 -07:00
Ian Douglas Scott
15e73830fa Use gbm device from image copy protocol instead of default node
This fixes `BufferConstraints` errors for workspace capture on Nvidia
outputs of a Intel+Nvidia system. (That didn't happen on Amd+Nvidia;
maybe a linear stride alignment issue?)
2025-05-19 13:11:30 -07:00
Ian Douglas Scott
5bb719f617 Use cosmic-freedesktop-icons, like libcosmic 2025-05-15 10:05:57 -07:00
Ian Douglas Scott
bf0830c20e Run cargo update 2025-05-15 10:00:27 -07:00
Vukašin Vojinović
f76e547540 fix(view): scaling behavior
This should prevent the pin button and text being getting pushed out with horizontal workspaces and when scaling vertical workspaces.
2025-05-02 12:44:03 -07:00
铺盖崽
edd75b8121
i18n(zh-CN): update desktop file translation 2025-05-01 17:13:31 +02:00
Vukašin Vojinović
e2e0f09311 fix(view): match pin button appearance to designs 2025-04-24 17:08:15 +02:00
Ian Douglas Scott
3c9a923f41 Add support for workspace pinning and dragging
Workspaces can be pinned, and dragged to reorder or move to a different
output.

These features are enabled only if cosmic-workspace-v2 advertises the
necessary protocol version and capabilities.

The layout of the labels and pin buttons could be tweaked a bit still.
Some hacks and workarounds are needed to get drag and drop working as
desired. Something iced and libcosmic could potentially improve in the
future. But this now seems fairly robust.
2025-04-22 11:43:30 -07:00
Ian Douglas Scott
94ec10686e backend/wayland: Support running without toplevel manager protocol 2025-04-21 14:21:57 -07:00
Ian Douglas Scott
77ff4e62e9 Pass toplevel_capabilities from backend to frontend 2025-04-21 14:02:36 -07:00
Ian Douglas Scott
fc784af1b9 Fix building with mock-backend 2025-04-21 13:49:49 -07:00
Ian Douglas Scott
7037cd3d05 Activate workspace only if capability is present
Potentially relevant on compositors not advertising this, or if a
compositor wanted to advertise `Activate` support for some but not all
workspaces. This will be more relevant with other capabilities.
2025-04-21 13:20:42 -07:00
Ian Douglas Scott
655621fde0 Fix clippy lints 2025-04-21 11:32:07 -07:00
Ian Douglas Scott
62fbd056bf Store cctk::workspace::Workspace in struct Workspace
Instead of adding more fields to this struct that need to be copied from
the cctk type, just wrap it. Can add methods where that's convenient.
2025-04-21 10:36:44 -07:00
Ian Douglas Scott
bcb68ab054 widget/toplevel_item: Rename to size_cross_nth; take index argument
Name is a bit awkward, but useful for other purposes.
2025-04-17 13:45:55 -07:00
Ian Douglas Scott
4637fcb655 widget/toplevel_item: Fix tree passed to layout() of second child 2025-04-17 13:22:34 -07:00
Vukašin Vojinović
588e889e0b chore(view): remove bg_element
This removes the unused `bg_element` function.
2025-04-16 18:25:04 -07:00
Vukašin Vojinović
2b7a8b133e improv(view): make workspace item sizing more dynamic
This makes the `workspace_bar` more responsive to different child sizes, which enables fixing the size of the smaller dimension of the screencopy, while allowing it to expand unrestricted in the larger dimension (to match the aspect ratio).
2025-04-16 18:25:04 -07:00
Ian Douglas Scott
d4ddae7799 Fix "never read" lint 2025-04-15 14:17:23 -07:00
Ian Douglas Scott
74270a2deb Use ThreadExecutor instead of calloop executor
I thought the calloop executor had been fixed, but it still seems to
have issues that were preventing capture of continuous frames from
working consistently.

Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/160.
2025-04-15 12:34:37 -07:00
Ian Douglas Scott
7ab1f93acf Add and use TwoRowColToplevelLayout
This tries to find a split point in the list of toplevels to maximize
the scale factor when calling `RowColToplevelLayout` twice. If it
doesn't get a better scale factor, it just uses a single row/column.

Some things don't seem quite right, but the existing layout is not
perfect, and this can help.

Without the added cross axis spacing, there's overlap, so there may be
something wrong with the requested sizes...
2025-04-08 16:25:16 -07:00
Ian Douglas Scott
1fd7a86ecc row_col_toplevel_layout: Add a new method 2025-04-08 16:25:16 -07:00
Ian Douglas Scott
5349f0f3d0 row_col_toplevel_layout: Take into account max cross axis in scale factor
Previous definition assumed the cross axis of a single window would not
need more downscaling than the total main axis of all children. But that
doesn't always work out.
2025-04-08 16:25:16 -07:00
David Carvalho
b3fb34e8c5
i18n - update portuguese translations (#154) 2025-04-08 15:57:23 -06:00
Feike Donia
076bb981a6
i18n(nl) update and improve Dutch translation (#131) 2025-04-08 08:05:22 -06:00
VandaLHJ
643f6b8fdf
Update cosmic_workspaces.ftl PL translation (#132)
Added workspace $number or something
2025-04-08 08:04:55 -06:00
Weeesly
5b3f9afb80
Create cosmic_workspaces.ftl (#69) 2025-04-08 08:04:21 -06:00
Yevhen Popok
3650d7c6a9
Add Ukrainian translation (#74) 2025-04-08 08:03:45 -06:00
João Ribeiro
609a410cb6
i18n(pt): create Portuguese translation (#91) 2025-04-08 08:02:52 -06:00
kkCoder111
1d40870e0e
Add Tamil translation (#102) 2025-04-08 08:02:27 -06:00
x9a
7e14e36899
i18n(ar): add Arabic translation (#103) 2025-04-08 08:02:10 -06:00
therealmate
d567c22df3
Add Hungarian translations (#124)
Co-authored-by: Jeremy Soller <jackpot51@gmail.com>
2025-04-08 08:01:52 -06:00
dannilundgren
c32c858a1a i18n(dk) Add danish translation 2025-04-08 08:00:54 -06:00
Aindriú Mac Giolla Eoin
add143b331 Added Irish translation 2025-04-08 07:59:43 -06:00
Benjamin Weis
ab30e3578e i18n(de): add German translation 2025-04-08 07:59:26 -06:00
铺盖崽
201e340dbf i18n(zh-CN): create zh-CN translation 2025-04-08 07:59:12 -06:00