Commit graph

181 commits

Author SHA1 Message Date
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
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
Ian Douglas Scott
81ea2f20d4 Fix building with mock-backend and no-subsurfaces 2024-12-16 17:00:09 -08:00
Ian Douglas Scott
70d6c415a1 Don't panic if dmabuf global isn't present
Fixes support for cosmic-workspaces with shm capture with no hardware
accelerated graphics present.
2024-08-07 15:01:26 -07:00
Ian Douglas Scott
ef0d7bbc63 Close workspaces view if window spawns while open
We may want to adjust this if it sometimes leads to confusing behavior.
This may be better for now anyway.

Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/28.
2024-07-29 22:14:47 -07:00
Ian Douglas Scott
2de366939b Correctly restrict modifiers in screencopy
Fixes issues for workspace capture in multi-gpu systems. Though I wonder
if the modifiers requested here match the render device...
2024-07-18 13:28:56 -07:00
Ian Douglas Scott
686f4e764f Don't show background; rely on cosmic-comp for that
Requires https://github.com/pop-os/cosmic-comp/pull/609, or this will
show all the open windows.
2024-07-15 11:34:54 -07:00
Ian Douglas Scott
7ff45540e8 Deduplicate drag_surface code a bit 2024-07-15 11:32:07 -07:00
Ian Douglas Scott
e9e6cc275b Move drag surface view into a function
It's a bit clearer this way.
2024-07-10 18:41:34 -07:00
Ian Douglas Scott
594ecffa66 Apply both offset and alpha to drag surfaces 2024-06-12 09:40:13 -07:00
Ian Douglas Scott
a014d8ca3d Unset drop_target after success, or close 2024-05-08 13:48:13 -07:00
Ian Douglas Scott
30b0cfe17b Fix handling leave event to one widget after enter for another 2024-05-02 12:53:09 -07:00
Ian Douglas Scott
0f237155bf Clear drop_target when leaving drag 2024-05-02 08:05:51 -07:00
Ian Douglas Scott
d05dfd7016 Add spacing between workspaces 2024-05-02 08:05:51 -07:00
Ian Douglas Scott
ccef25c40c Use subscription for cosmic-bg-config
Works, as long as a `config_state_subscription` is used.

Should also try caching image handles.
2024-05-02 08:05:51 -07:00
Ian Douglas Scott
6cca5476ab User hover style for drop target 2024-05-02 08:05:51 -07:00
Ian Douglas Scott
b635c10837 Add offset logic, commented
With large drag surfaces, and no tranparency, this seems a bit akward
when not dragging from near top left. May be better with cursor
indicator.
2024-05-02 08:05:51 -07:00
Ian Douglas Scott
07f7b8f5bd Fix toplevel activation
`new_seat()` is only called when a seat is added after creation of
`SeatState`.
2024-05-01 10:12:00 -07:00
Ian Douglas Scott
249c62ee0a Update libcosmic/iced 2024-04-30 16:25:50 -07:00
Ian Douglas Scott
d759e1d7c2 Use cosmic_bg_config to get background
Scaling doesn't match `cosmic-bg`?
2024-04-30 12:49:08 -07:00
Ian Douglas Scott
bf6acc3f5f Destroy image_source after using it 2024-04-26 15:38:20 -07:00
Ian Douglas Scott
96cca005b7 Rename inaccurately named widget 2024-04-25 14:17:43 -07:00
Ian Douglas Scott
8f571e9e25 Use custom style for workspace items
None of the default styles seem to work quite right here.
2024-04-25 14:10:09 -07:00
Ian Douglas Scott
7997d58ce7 Fix clippy lints 2024-04-24 13:51:20 -07:00
Ian Douglas Scott
3dd5a28e28 backend/mock: fill buffer more efficiently 2024-04-24 13:04:23 -07:00
Ian Douglas Scott
ee1d54a12b Format imports 2024-04-24 13:00:40 -07:00
Ian Douglas Scott
76daf6e980 Update libcosmic/iced for drag-and-drop fixes 2024-04-24 12:46:57 -07:00
Ian Douglas Scott
ef12588615 mock: Use Format::Argb8888
Allows running on KDE, to compare how another compositor implementation.
2024-04-23 17:25:15 -07:00
Ian Douglas Scott
a6548057b6 Don't hide toplevel until drag is started
Seems to fix behavior on Sway, but on Smithay still destroys the drag
grab once the surface that started it is gone.
2024-04-23 17:23:57 -07:00
Ian Douglas Scott
c75a48535a Add a mock backend for testing (including on other compositors)
Should help determine which issues are cosmic-comp bugs.
2024-04-23 13:44:59 -07:00
Ian Douglas Scott
170e102275 Use Cmd instead of sending more wayland objects to frontend
This isn't needed now that the workspaces view is persistent (before, it
was necessary to make sure activation requests are flushed before
closing).

This is easier to spoof, for testing.
2024-04-23 11:54:05 -07:00
Ian Douglas Scott
8365efb30d Fix VisibilityWrapper widget
I believe this fixes how the widget works, though it's hard to tell
since the behavior was inconsistent.

There are still issues related to drag-and-drop in cosmic-comp or
`iced_sctk`, which need to be fixed to get things working fully.
2024-04-22 10:16:41 -07:00
Ian Douglas Scott
6f45933971 Fix various warnings 2024-04-19 15:44:55 -07:00
Ian Douglas Scott
09e03cd096 Hide toplevel from toplevel list when it is being dragged
Uses a custom wrapper widget, that makes `draw` do nothing when visible
is set to false.

This works well sometimes, but can cause weird bugs...
2024-04-19 15:28:16 -07:00
Ian Douglas Scott
b011ecd615 Use single-threaded async executor 2024-04-19 10:54:42 -07:00
Ian Douglas Scott
888b1c542d Don't use dGPU for rendering on dual-graphics systems
Apparently the `antialiasing` flag determines this.
2024-04-09 15:35:09 -07:00
Ian Douglas Scott
bf2cd273f9 Add a no-subsurfaces feature for debugging 2024-04-01 15:13:51 -07:00
Ian Douglas Scott
1fc416bb2e Add force-shm-screencopy feature for debugging 2024-04-01 14:44:29 -07:00
Ian Douglas Scott
a2493fc90e Fix creation of shm buffers 2024-04-01 14:09:15 -07:00
Ian Douglas Scott
62c9f986ba screencopy: Include error in error log 2024-03-28 15:15:32 -07:00