Commit Graph

51 Commits

Author SHA1 Message Date
moetayuko
bdaf1ec6e4
implement wayland fullscreen detector (#261)
* feat: wayland fullscreen detector

* feat: pause mpv when fullscreen
2024-11-08 01:54:26 +01:00
Alexis Maiquez
1c12951a6a chore: update readme
chore: some X11 files were being included in wayland-only builds
2024-10-12 20:59:51 +02:00
Alexis Maiquez
c400f49275 fix: screenshot taken was black 2024-10-12 20:25:56 +02:00
Alexis Maiquez
7278f2f817 fix: replace FreeImage with stb_image and stb_image_write
fixes #204
2024-10-12 20:11:14 +02:00
Almamu
50d3bced8e fix: hopefully fix running from arch's package 2024-06-06 21:40:13 +02:00
Almamu
6c27d94115 fix: #219 window mode wasn't rendering because of an issue with default background detection 2024-05-21 14:20:08 +02:00
Almamu
9712f20140 fix: improve how default background is determinated, hopefully improves #219 2024-05-21 14:14:03 +02:00
Almamu
cdfa4ff7a1 chore: some more verbosity on error messages when loading assets 2024-05-16 15:22:26 +02:00
Almamu
4dbb3cc422 chore: renamed members not properly named 2024-05-11 19:01:46 +02:00
Almamu
8a8741dbff chore: clang-format 2024-05-11 17:38:25 +02:00
Almamu
c44a86d218 fix: missing unistd include 2024-05-11 17:28:53 +02:00
Almamu
953ef01749 feat: conditionally enable wayland and x11 support 2024-05-11 17:19:42 +02:00
Almamu
8dbb4aa7e8 chore: linting 2024-05-07 04:24:46 +02:00
Almamu
9e271a2b39 chore: remove notion of default background in render, each screen needs it's own independent render 2024-05-07 04:15:20 +02:00
Almamu
235cda8c94 chore: move cef initialization to its own context 2024-05-07 03:59:40 +02:00
Almamu
006d4ee3d0 chore: move wallpaper types to their own folder 2024-05-07 02:55:10 +02:00
Alexis Maiquez
c90cc4d915 feat: add option to disable audio processing
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-12-14 03:21:06 +01:00
Alexis Maiquez
b8fd1eefac chore: clang-format and code formatting done with an extra of code cleanup
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-12-14 02:20:34 +01:00
Alexis Maiquez
89a2178308 CDirectory should not use sLog for errors
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-12-12 02:13:06 +01:00
Pasalc
11666abf32 Added scaling and clamp support 2023-11-13 21:38:56 +03:00
Alexis Maiquez
bd6fd9a100 Output rendering is now responsibility of the drivers (as it should be) instead of being handled by the CRenderContext
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-04-23 00:12:23 +02:00
Alexis Maiquez
b9dbb652d3 Hopefully last missed ENABLE_WAYLAND check
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-04-22 13:13:00 +02:00
Alexis Maiquez
ddd448b1e3 Added wayland build to github actions
Ensure wayland included files are ignored unless ENABLE_WAYLAND is enabled

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-04-22 13:09:31 +02:00
Alexis Maiquez
f21a6e64a7 Wayland implementation cleanup
Removed wayland-display in favour of screen-root, it should automatically switch between X11 and Wayland implementations
Removed all the window-server-specific code from CWallpaperApplication
Moved COutput from CWallpaperApplication to each CVideoDriver as the output is tied to the driver
Moved CFullScreenDetector from CWallpaperApplication to each CVideoDriver as the detection is tied to the video driver
Applied the Driver treatment to the Input, this way CInputContext doesn't depend on the driver used
Updated CRenderContext to be aware of viewport-specific context updates
Viewport information is now held inside COutputViewport instead of being a simple map
Merged CLayerSurface and SWaylandOutput, inheriting from the new COutputViewport to standarize the minimum requirements of a viewport
  (makeCurrent and swapOutput are common requirements, X11 was the outlier not needing these per-viewport)
Moved all the viewport-specific code of Wayland from CWaylandOpenGLDriver to It's own class CWaylandOutputViewport
Fixed an issue under Wayland where sometimes the background surfaces wouldn't get anything drawn because the CWaylandOutput wasn't reset
Updated screenshot-taking code to be standard for all drivers again

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-04-22 11:31:50 +02:00
vaxerski
2b7367662f Fix multi-bg screenshots 2023-04-21 18:24:19 +01:00
vaxerski
031ed01c42 properly flip screenshots 2023-04-21 18:03:08 +01:00
vaxerski
87b765e618 properly adhere to fps limits 2023-04-21 15:23:10 +01:00
vaxerski
1f6cc8206f Merge remote-tracking branch 'upstream/main' 2023-04-20 22:11:54 +01:00
Alexis Maiquez
73ef4d6dbf Added support for g_Daytime in shaders
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-04-20 22:48:08 +02:00
vaxerski
ffeec7f1dd make wayland impl optional 2023-04-20 13:52:25 +01:00
vaxerski
43409229a9 proper scaling + recalc on geom change 2023-04-20 13:28:36 +01:00
vaxerski
b505db103c allow specifying outputs with a flag 2023-04-19 21:02:44 +01:00
vaxerski
e5b447bdc9 initial impl 2023-04-19 20:18:20 +01:00
Alexis Maiquez
13e43bada7 Added parameter to configure fullscreen detection
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-04-18 06:56:25 +02:00
Alexis Maiquez
93380ae229 Added some window hints
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-27 01:36:01 +02:00
Alexis Maiquez
a89d8ebb22 Added basic support for audio processing so backgrounds can react to sound playing in the system
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-26 18:18:21 +02:00
Alexis Maiquez
ca471c04fc Placed audio detectors in the right folder
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-24 02:51:17 +01:00
Alexis Maiquez
45761fb858 Added sound muting when apps are fullscreen too
Finally closes #150 and #152

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-24 02:48:49 +01:00
Alexis Maiquez
978f56cdca Added sound playback detection to mute when something else plays audio
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-24 02:36:42 +01:00
Alexis Maiquez
cc7ec0561d Separated X11 fullscreen code detection from the output driver as they don't have to work at the same time
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-23 23:38:23 +01:00
Alexis Maiquez
84f6018e1a Added application state to keep track of enable/disable audio and volume changes when things go fullscreen
Removed .clang-format as it's not useful

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-23 09:10:51 +01:00
Alexis Maiquez
f499454957 Fixed identation problems
Added comments all over the codebase to explain things a bit better
Improved CApplicationContext to be a bit more self-explanatory
Abstracted CRenderContext access away into a helper that every render class should use

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-23 01:42:01 +01:00
Alexis Maiquez
6d5c5b7825 Hopefully addressed #148 while detecting the patches folder
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-21 07:35:41 +01:00
Alexis Maiquez
a0d1a7202f Fixed build of release versions
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-21 07:15:38 +01:00
Alexis Maiquez
b69ce8ba57 Added support for running multiple X11 backgrounds off the same instance
Window mode now has extra settings for setting the position and size
Fixed audio not muting when --silent was used

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-03-21 07:07:36 +01:00
Alexis Maiquez
37631e9c40 Upgraded to shader version 330
Added support for shader patches
Removed useless DEBUG define in favour of NDEBUG

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-11 03:21:45 +01:00
Alexis Maiquez
732c60da46 More code cleanups
Update .clang-format

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-08 18:48:19 +01:00
Alexis Maiquez
48a91ff297 More code cleanup
Input is now handled by context

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-08 14:57:17 +01:00
Alexis Maiquez
d2e82e72d8 Small code cleanups
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-08 14:27:41 +01:00
Alexis Maiquez
26f6156f34 MPV should respect volume levels now
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2023-02-07 11:29:57 +01:00