Commit graph

149 commits

Author SHA1 Message Date
Ian Douglas Scott
a90a3a16b2 Simplify buffer creation code 2024-01-26 14:30:23 -08:00
Ian Douglas Scott
d869a29be7 Have .mmap member for Buffer for both shm and dmabuf 2024-01-26 14:23:04 -08:00
Ian Douglas Scott
2164c1ea5a Create shm buffer directly instead of using RawPool
Currently needed if we want an fd to pass to iced-sctk for subsurfaces.
Rather than a wl_buffer.

It would be good if this logic and the dmabuf type could be shared in
some crate.
2024-01-26 14:13:58 -08:00
Ian Douglas Scott
d50c1f13f6 Fix subtract overflow 2024-01-26 13:04:58 -08:00
Ian Douglas Scott
2b3773c88e Handle gbm::Modifier::Invalid 2024-01-25 18:35:25 -08:00
Ian Douglas Scott
01a64b11fa Add scheduler for async in wayland thread 2024-01-25 17:06:28 -08:00
Ian Douglas Scott
7ae2dc9e06 Fix reference to back buffer 2024-01-25 16:21:21 -08:00
Ian Douglas Scott
9faaa4d6c8 Use array instead of tuple for screencopy swapchain
Can switch to triple buffering by changing one character.
2024-01-25 16:16:26 -08:00
Ian Douglas Scott
6e422b740c Call attach_buffer_and_commit before reading front buffer
This way double buffering is somewhat useful; we can start another
capture before reading out the buffer.
2024-01-25 16:00:37 -08:00
Ian Douglas Scott
89910b8e75 Use double-buffering for screencopy
Currently this is unnecesssary, but it's needed if we use subsurfaces
(or import) instead of immedaitely converting to an image.
2024-01-25 15:58:34 -08:00
Ian Douglas Scott
6262329635 Clean up some of the screencopy code 2024-01-25 15:48:40 -08:00
Ian Douglas Scott
13b565e013 Add a ScreencopySession type
Allows cleaning up some of the relationship between `screencopy.rs` and
`capture.rs`, and groups variables that go together and are set to `Some`/`None`
together.

Should help for adding double buffering.
2024-01-25 15:44:30 -08:00
Ian Douglas Scott
43e9ef390a Move attach_buffer_and_commit 2024-01-24 16:07:00 -08:00
Ian Douglas Scott
6f1b391b00 Destroy screencopy session when not capturing 2024-01-24 15:59:18 -08:00
Ian Douglas Scott
b958a13b88 Remove outdated comment 2024-01-24 15:30:41 -08:00
Ian Douglas Scott
14d2a66c9d Re-use screencopy session instead of creating one each frame 2024-01-24 15:29:03 -08:00
Ian Douglas Scott
5269356089 Use Weak<Capture> in session state 2024-01-24 13:59:18 -08:00
Ian Douglas Scott
82951822b9 If toplevels don't fit, scale by same factor 2024-01-22 17:19:46 -08:00
Ian Douglas Scott
b60102c908 Update dependencies 2024-01-22 14:56:31 -08:00
Ian Douglas Scott
7d0882162b Spacing fix 2024-01-22 13:40:10 -08:00
Ashley Wulber
68c91f2454 fix: update desktop file 2024-01-22 10:10:48 -05: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
9d2f2f68d0 Update dependencies 2024-01-19 03:35:33 -08:00
Ian Douglas Scott
6a9e47e160 Update dependencies 2024-01-17 17:58:39 -08:00
Ian Douglas Scott
bc0898fa0a Update dependencies 2024-01-03 10:57:47 -08:00
Ian Douglas Scott
907410fab9 Add cosmic-config settings, and subscribe 2023-12-29 13:44:19 -08:00
Ian Douglas Scott
8718c38a30 Update dependencies 2023-12-26 13:59:31 -08:00
Ian Douglas Scott
b2f81b1a73 i18n 2023-12-26 13:54:29 -08:00
Ian Douglas Scott
0f0ee85d1a Add i18n support 2023-12-26 13:40:38 -08:00
Ian Douglas Scott
68beafe911 Subscribe to changes in cosmic-comp configuration 2023-12-21 10:41:46 -08:00
Ian Douglas Scott
f6ba3b6f98 Run cargo update 2023-12-20 15:07:10 -08:00
Ian Douglas Scott
aac02973c1 Remove unused import 2023-12-20 14:46:43 -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
f40c5919cd Run cargo update 2023-12-15 15:53:53 -08:00
Ian Douglas Scott
06c37e39f5 WIP custom cursor for drag and drop 2023-12-15 15:46:41 -08:00
Ian Douglas Scott
d56a591a9f Passthrough widget implementation with treating as child 2023-12-15 13:39:02 -08:00
Ian Douglas Scott
c4adca76c0 Use delegate crate to simplify things a bit. 2023-12-15 13:33:29 -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
f189c2d49e Don't remove last workspace 2023-12-14 16:19:53 -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
df81bd4e4c Fix dependency 2023-12-13 12:41:06 -08:00
Ian Douglas Scott
35cb345b70 Run cargo update 2023-12-13 09:41:45 -08:00