feat: initial video wallpaper implementation

This commit is contained in:
2026-10-25 02:10:50 +02:00
parent 200a6a5d54
commit 0d0faecb1c
14 changed files with 1280 additions and 88 deletions
+16 -1
View File
@@ -3,6 +3,8 @@
#include <EGL/egl.h>
#include <wayland-egl.h>
#include <atomic>
#include <QSize>
#include <QString>
@@ -32,7 +34,14 @@ class WallpaperSurface : public QtWayland::zwlr_layer_surface_v1,
[[nodiscard]] const QSize& bufferSize() const { return m_bufferSize; }
[[nodiscard]] EGLSurface eglSurface() const { return m_eglSurface; }
void redraw();
void markDirty();
[[nodiscard]] bool needsDraw() const;
[[nodiscard]] bool frameReady() const;
void requestFrame();
void endDraw();
private:
void zwlr_layer_surface_v1_configure(
@@ -42,6 +51,8 @@ class WallpaperSurface : public QtWayland::zwlr_layer_surface_v1,
void updateBuffer();
void onFrameDone();
WallpaperService* m_service;
QString m_screen;
wl_surface* m_surface;
@@ -53,6 +64,10 @@ class WallpaperSurface : public QtWayland::zwlr_layer_surface_v1,
qreal m_scale = 1.0;
bool configured = false;
std::atomic<bool> m_dirty{false};
std::atomic<bool> m_frameReady{true};
struct wl_callback* m_frameCallback = nullptr;
};
} // namespace ZShell::internal