Commit graph

21 commits

Author SHA1 Message Date
Gergő Sályi
d953a123fe Move struct declaration to the top, remove unnecessary visibilities 2025-04-25 14:07:01 +02:00
Gergő Sályi
3a90b4b9e8 Fix regressed wl_shm format choosing, delay it until formats are available 2025-04-24 15:15:58 +02:00
Gergő Sályi
6eec049e48 Flush Wayland events before having to send too many file descriptors at once
Works around a bug in the wayland-backend dependency failing to limit
the number of file descriptors sent in one message to MAX_FDS_OUT = 28
2025-04-24 14:50:24 +02:00
Gergő Sályi
cd22b9bebe Fix the way Wayland reads handle the WouldBlock error 2025-04-23 22:19:12 +02:00
Gergő Sályi
decaa33752 Format code 2025-04-23 15:21:51 +02:00
Gergő Sályi
5fd6cbe114 Add implementation to upload and serve wallpapers from GPU memory using Vulkan
Add handling for the Linux DMA-BUF Wayland protocol
Refactor Wayland code for image loading and image equivalence
Add Vulkan code using the ash crate dependency targeting Vulkan 1.1
For image DMA-BUF exporting use EXT_image_drm_format_modifier if available,
fall back to linear images otherwise
Add --gpu command line option
Add Vulkan packages as optional dependencies to Arch Linux PKGBUILD
2025-04-21 17:46:48 +02:00
Gergő Sályi
8b8d2cbaf7 Refactor the handling of image color transform parameters 2025-04-16 14:49:02 +02:00
Gergő Sályi
a2f9ad2b83 Change main event loop to use poll instead of the mio dependency 2025-04-13 22:42:49 +02:00
Gergő Sályi
b06204360d Refactor, move application state struct to main.rs 2025-04-13 14:11:09 +02:00
Gergő Sályi
0e1f98f40b Add unix signal handling
Implement unix signal handling using a basic self pipe
Shutdown gracefully on termination signals TERM, INT or HUP
Reserve signals USR1 and USR2 for future use
2025-04-12 19:51:53 +02:00
Gergő Sályi
00546678ca Prepare better error handling, add anyhow dependency 2025-04-12 14:37:42 +02:00
Gergő Sályi
1fdbd7ffb0 Add support to the niri Wayland compositor
Implement niri support
Try to autodetect running compositor based on environment variables
XDG_SESSION_DESKTOP, XDG_CURRENT_DESKTOP, SWAYSOCK, NIRI_SOCKET in this order
Add the --compositor command line option
Add niri as optional dependency to the Arch Linux PKGBUILD
Update README and --help to include niri support

Merges the changes from
https://github.com/gergo-salyi/multibg-sway/pull/12
Thanks to the co-author for the contribution

Co-authored-by: Florian Finkernagel <finkernagel@imt.uni-marburg.de>
2025-04-08 19:09:00 +02:00
Gergő Sályi
ea45c60ab1 Add a logging message to initialization 2024-09-30 20:49:26 +02:00
Gergő Sályi
1f253ac3f9 Formatting only - apply added editorconfig to all files 2024-09-30 20:29:09 +02:00
Gergő Sályi
abb85692e4 Add --pixelformat cli argument
Enables setting --pixelformat=baseline
to force wl_buffers to use the wayland default xrgb8888
2024-05-11 00:55:54 +02:00
Gergő Sályi
2711872a53 Add support for outputs with fractional scale factor
Hopefully this will help displaying the wallpapers correctly
on outputs with fractional scale factor:
https://github.com/gergo-salyi/multibg-sway/issues/5
2024-03-25 14:09:44 +01:00
Gergő Sályi
67abbb9a37 Remove inactive and superseded code 2024-01-02 18:58:59 +01:00
Gergő Sályi
71dc725ec7 Create shm slot pools per output instead of using one in the global state
This allows the release of graphics memory per output when an output is
destroyed, unlike when we had only one shm slot pool that cannot shrink

Hopefully this will help with a claimed leak of graphics memory:
https://github.com/gergo-salyi/multibg-sway/issues/2
2023-08-31 17:35:35 +02:00
Gergő Sályi
80f7f88532 Fix panic when the process is suspended
In main event loop mio poll should immediately continue and retry on EINTR
https://github.com/gergo-salyi/multibg-sway/issues/1
2023-04-26 21:18:20 +02:00
Gergő Sályi
fbfd7e722e Update 2023-04-07 21:49:13 +02:00
Gergő Sályi
3eedfa1eb5 Initial commit 2023-04-07 17:25:48 +02:00