Commit graph

329 commits

Author SHA1 Message Date
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
David Carvalho
037728e3ad i18n (pt-BR) Update translations 2025-04-08 07:58:58 -06:00
David Carvalho
503640db2f i18n (pt-BR) Update translations 2025-04-08 07:58:58 -06:00
neko0xff
f5a8b00732 i18n(zh-TW): add zh-TW translation 2025-04-08 07:58:34 -06:00
Matei Pralea
ded20a94a4 i18n(ro): Add Romanian translation 2025-04-08 07:57:39 -06:00
Ian Douglas Scott
ca23d3ad67 Use Layer::Top instead of Layer::Overlay
https://github.com/pop-os/cosmic-workspaces-epoch/issues/66. If we want
to hide the workspaces overlay when a popup is opened, that still needs
to be done, but using the same layer as the panel should be good in
general. There's no clear reason to have it on the `Overlay` layer.
2025-04-07 12:32:36 -07:00
Ian Douglas Scott
26b773c643 Use match instead of a couple if let branches 2025-04-07 08:20:51 -07:00
Ian Douglas Scott
874245bc2e Use aliasable in AxisToplevelLayout to use slice in argument
This makes layouts possible to compose without clones.
2025-03-24 14:59:25 -07:00
Ian Douglas Scott
f2a2904978 Filter WaylandEvent::RequestResize events out of subscriptions
There seems to be a flood of this event. Probably shouldn't be? In any
case, we don't use this event so we don't need to call `.update()` with
it.
2025-03-21 12:57:28 -07:00
Ian Douglas Scott
6f93a10560 Make dnd_destination code more generic 2025-03-18 13:30:37 -07:00
Ian Douglas Scott
a9dcdce525 chore: update libcosmic 2025-03-14 13:42:42 -07:00
Ian Douglas Scott
6b6bf454db Update to workspace v2, based on ext-workspace
Requires https://github.com/pop-os/cosmic-protocols/pull/51,
https://github.com/pop-os/cosmic-comp/pull/1225.

The new protocol version is a hard requirement, and this will panic
without it.
2025-03-07 22:24:36 -08:00
Ashley Wulber
7f877f72a3 fix: invert scroll direction 2025-02-20 18:52:53 -05:00
mkljczk
b9fcff56c9 Polish translation for .desktop entry
Signed-off-by: mkljczk <git@mkljczk.pl>
2025-02-19 15:34:01 -07:00
Ian Douglas Scott
4acd62abb0 Update for toplevel-info cctk changes 2025-02-13 11:46:45 -08:00
Ian Douglas Scott
e283cfe456 Fix build with mock-backend feature 2025-02-10 14:05:31 -08:00
Ian Douglas Scott
52bbc6c083 Fix warnings and remove dbg! 2025-02-10 12:04:20 -08:00
Ian Douglas Scott
ca5db9cc8e UI code for supporting workspace drags
Not used yet.
2025-02-10 12:02:36 -08:00
Ian Douglas Scott
9b12e76765 Rename DndWorkspaceDrag to DndToplevelDrag 2025-02-10 10:11:04 -08:00
Ian Douglas Scott
b5d2eed726 toplevel_layout: Add AxisToplevelLayout helper 2025-02-06 15:09:57 -08:00
Ian Douglas Scott
1342e37ad6 toplevel_layout: Make size depend on axis 2025-02-06 13:45:34 -08:00
Ian Douglas Scott
eb69aba7b2 toplevel_layout: Move logic into a requested_main_total method 2025-02-06 13:40:45 -08:00
Ian Douglas Scott
136d02ce28 Fix disabled scroll accumulation 2025-02-06 13:37:53 -08:00
Ian Douglas Scott
5842829c59 Accumulate scroll events
Not sure the perfect way to do this; the workspace applet is a little
different.

A helper of some kind should be added to libcosmic.
2025-02-06 13:32:50 -08:00
Ian Douglas Scott
3d7d3823c4 Change workspace based on scroll events
Works, I'm not sure how many pixels to interpret as a change to the
workspace, and perhaps it should accumulate multiple deltas with a
timer. Assuming some lower level of the stack isn't doing that already.
I only see `ScrollDelta::Pixels` events, not `Lines`, though maybe
that's relevant with a different type of input device.

The behavior would also be clearer with animation, though it doesn't
seem to bad
(https://github.com/pop-os/cosmic-workspaces-epoch/issues/32).

Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/34.
2025-02-06 13:32:50 -08:00
Ian Douglas Scott
a977667ac5 Use updated screencopy abstraction
Requires https://github.com/pop-os/cosmic-protocols/pull/46.
2025-02-04 13:58:20 -08:00
Ian Douglas Scott
ba52d69421 Add workspaces_for_output helper function 2025-01-24 15:30:15 -08:00
Ian Douglas Scott
88b35e3027 Allow dropping window onto toplevel list area
Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/53.
2025-01-24 14:54:29 -08:00
Ian Douglas Scott
6838bd60be Remove unneeded field of DragSurface 2025-01-24 14:41:36 -08:00
Ian Douglas Scott
207e7b2ff3 Fix building mock backend 2025-01-24 14:33:04 -08:00
Ian Douglas Scott
3dc82789f5 Move drag-and-drop related types to a dnd module 2025-01-24 14:28:42 -08:00
Ian Douglas Scott
efdfaed6c8 DropTarget enum instead of tuple; combine with DragId
I guess some change is needed for handling workspaces that span outputs
(can't encode both the workspace and output id in less than 64 bits, and
need bits for discriminant as well). But that's an issue with the
previous workspace index based approach.

I wonder if `drag_id` is really needed; libcosmic could check if the
drag is in bounds of the widget, if drag surfaces can't overlap...
2025-01-24 14:09:17 -08:00
Ian Douglas Scott
f532205bf9 view: Add DragId helper to manage multiple types of destinations 2025-01-24 13:24:13 -08:00
Adam Cosner
fd0bdeebbf feat: Workspace view closing by pressing current workspace or empty space 2025-01-23 20:02:16 -08:00
Ian Douglas Scott
e032b0b5ee Center toplevels if they don't fill space 2025-01-22 13:42:04 -08:00
Ian Douglas Scott
8a4d4b6957 Have icon_for_app_id run in a background thread
This should probably be faster, but it's good for things like this to
not block the UI thread regardless.

We could probably also cache for multiple apps with the same ID. Not
sure if there's a good way to detect changes to the icon for an app id
(Not really needed, probably?)
2025-01-21 09:24:19 -08:00
Peter Krull
0c9cabd21a performance: Add app_id check to throttle icon fetch 2025-01-21 08:50:55 -08:00
Ian Douglas Scott
e3b65d4772 Remove LayerShell only once iced confirms surface destroyed
Prevents "NO VIEW" messages, and possible flicker to placeholder widget.
2025-01-16 14:50:45 -08:00
Ian Douglas Scott
a428659ade Use std LazyLock instead of once_cell crate 2025-01-16 10:21:35 -08:00
Ian Douglas Scott
b259655839 Address some warnings 2025-01-16 10:19:58 -08:00
Ian Douglas Scott
5cb9f6eb09 Allow a couple clippy lints 2025-01-15 11:56:23 -08:00
Ian Douglas Scott
392adda651 Run cargo clippy --fix 2025-01-15 11:53:59 -08:00
Vukašin Vojinović
fe1363ea42 fix(interface): align closer to designs 2025-01-15 11:49:54 -08:00
Ian Douglas Scott
764b4ae5f8 Apply screencopy transform to subsurfaces
Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/17.
2025-01-15 10:18:50 -08:00
Ian Douglas Scott
8c4e66691c Run cargo update 2025-01-14 09:15:34 -08:00
Ian Douglas Scott
faa4a51fb9 Toplevel layout abstraction 2025-01-13 13:13:53 -08:00
Ian Douglas Scott
e1895ea3d7 Update dependencies 2025-01-13 10:42:44 -08:00
Ian Douglas Scott
b70828e23f Update iced/libcosmic 2025-01-13 10:26:45 -08:00
Ian Douglas Scott
e0c0f27f67 On mock backend, don't hide when toplevel is opened
Toplevels are only added on this backend when the workspaces view is
shown.
2024-12-16 17:55:14 -08:00