Commit graph

42 commits

Author SHA1 Message Date
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
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
76daf6e980 Update libcosmic/iced for drag-and-drop fixes 2024-04-24 12:46:57 -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
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
bf2cd273f9 Add a no-subsurfaces feature for debugging 2024-04-01 15:13:51 -07:00
Ian Douglas Scott
094c28e105 cosmic-screencopy-v2 2024-03-25 10:24:47 -07:00
Ian Douglas Scott
7106001179 Address various warnings 2024-03-05 12:25:20 -08:00
Ian Douglas Scott
ea0de44e42 Remove workspace close button for now 2024-03-05 12:07:38 -08:00
Ian Douglas Scott
78b7bfe957 Use Wayland subsurfaces, dmabuf screencopy
More efficient than shm screencopy, and rendering an iced image into the
window. Done right, should espeically help with multiple GPUs, but more
testing and work is needed there.

Removes mmapping of dmabuf, which errored... I guess not allocated with
right options for that. Relevant only if we want a fallback/test that
involves reading dmabufs.

Using `OnDamage` doesn't seem to work correctly currently. Likely a
compositor issue.
2024-03-01 14:35:19 -08:00
Ian Douglas Scott
66fcf19ccc Run cargo update, and remove use of WorkspaceAmount
`WorkspaceAmount` has been removed from cosmic-comp for now.
2024-02-07 19:52:33 -08:00
Ian Douglas Scott
015f61922b Update libcosmic 2024-02-06 13:32:29 -08:00
Ian Douglas Scott
99aeca0f2f Custom Toplevels widget
Fixes centering on toplevels.

Need to use fewer hacks, and add equal scale factor.

See if Iced layout system can be improved.
2024-01-19 15:32:54 -08:00
Ian Douglas Scott
ec5dceeed2 Custom widget to avoid stretching toplevel items
Avoids close button aligned way to right. And fixes offset for drag
surface.

But left aligns workspaces (need new container?).
2024-01-19 14:42:06 -08:00
Ian Douglas Scott
bc0898fa0a Update dependencies 2024-01-03 10:57:47 -08:00
Ian Douglas Scott
b2f81b1a73 i18n 2023-12-26 13:54:29 -08:00
Ian Douglas Scott
79584a6d93 Improve handling of horizontal orientation 2023-12-18 19:59:09 -08:00
Ian Douglas Scott
899dfb0a3d Show icons for toplevels 2023-12-18 19:41:30 -08:00
Ian Douglas Scott
c8f0590a55 Spacing and alignment adjustments 2023-12-18 19:05:22 -08:00
Ian Douglas Scott
6053c527a8 Add some padding around workspaces 2023-12-18 18:47:38 -08:00
Ian Douglas Scott
06c37e39f5 WIP custom cursor for drag and drop 2023-12-15 15:46:41 -08:00
Ian Douglas Scott
5a69aff778 Adjust toplevel label style 2023-12-14 16:56:05 -08:00
Ian Douglas Scott
88fa8eecd1 Adjust styling around workspaces sidebar 2023-12-14 16:46:49 -08:00
Ian Douglas Scott
0cebd30600 Fix excessive vertical height taken by button 2023-12-14 16:29:45 -08:00
Ian Douglas Scott
1f4bed40fc Don't expand workspace preview to fill height 2023-12-14 16:24:25 -08:00
Ian Douglas Scott
3ef8800fb4 Show background image
Harcoded path for now.
2023-12-13 17:58:38 -08:00
Ian Douglas Scott
a3e3bec885 Custom widget for sidebar; closing workspace
Need custom widget currently to distribute space correctly.
2023-12-13 15:54:33 -08:00
Ian Douglas Scott
ea9298c021 Make "New Workspace" button add workspace 2023-12-12 15:36:20 -08:00
Ian Douglas Scott
89021e3b8b Fix drag and drop; send command to compositor if supported 2023-12-11 14:06:41 -08:00
Ian Douglas Scott
5550f41814 dnd: Keep track of drop target
Now just need a protocol to move the toplevel to a workspace.
2023-12-06 11:02:21 -08:00
Ian Douglas Scott
f2c77d035c Drag toplevel to workspace; recognize what toplevel was dragged 2023-12-06 10:51:55 -08:00
Ian Douglas Scott
e5aca0a6b5 Allow dragging toplevel 2023-12-06 10:03:39 -08:00
Ian Douglas Scott
a85cf3f527 Add "new workspace" button
Still needs implementation. Can't set number of workspaces per display.
2023-12-05 16:58:53 -08:00
Ashley Wulber
791441ca10 refactor: single instance 2023-11-21 19:26:12 -05:00
Ian Douglas Scott
a0a11b6e02 More appropriate button theming 2023-11-17 15:12:35 -08:00
Ian Douglas Scott
fccc5f26e5 Initial support for horizontal workspaces 2023-11-17 14:56:37 -08:00
Ian Douglas Scott
94561b9ed1 Use cosmic::widgets 2023-11-16 20:09:10 -08:00
Ian Douglas Scott
0c19ea7167 Add CaptureImage type 2023-11-16 19:38:42 -08:00
Ian Douglas Scott
f5045286a9 Move view functions to a module 2023-11-16 19:25:28 -08:00