mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-06 19:14:57 +11:00
feat(slock): implement ext_session_lock_v1 backend
note: did not run lints or fully test yet
This commit is contained in:
parent
70c5cf1e16
commit
1fa87b7c5a
12 changed files with 525 additions and 1 deletions
39
src/wayland/session_lock/surface.hpp
Normal file
39
src/wayland/session_lock/surface.hpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#pragma once
|
||||
|
||||
#include <private/qwaylandshellsurface_p.h>
|
||||
#include <private/qwaylandshmbackingstore_p.h>
|
||||
#include <private/qwaylandwindow_p.h>
|
||||
#include <qregion.h>
|
||||
#include <qtclasshelpermacros.h>
|
||||
#include <qtypes.h>
|
||||
#include <qwayland-ext-session-lock-v1.h>
|
||||
|
||||
#include "session_lock.hpp"
|
||||
|
||||
class QSWaylandSessionLockSurface
|
||||
: public QtWaylandClient::QWaylandShellSurface
|
||||
, public QtWayland::ext_session_lock_surface_v1 {
|
||||
public:
|
||||
QSWaylandSessionLockSurface(QtWaylandClient::QWaylandWindow* window);
|
||||
~QSWaylandSessionLockSurface() override;
|
||||
Q_DISABLE_COPY_MOVE(QSWaylandSessionLockSurface);
|
||||
|
||||
[[nodiscard]] bool isExposed() const override;
|
||||
void applyConfigure() override;
|
||||
bool handleExpose(const QRegion& region) override;
|
||||
|
||||
void setExtension(LockWindowExtension*);
|
||||
void setVisible();
|
||||
|
||||
private:
|
||||
void
|
||||
ext_session_lock_surface_v1_configure(quint32 serial, quint32 width, quint32 height) override;
|
||||
|
||||
void initVisible();
|
||||
|
||||
LockWindowExtension* ext = nullptr;
|
||||
QSize size;
|
||||
bool configured = false;
|
||||
bool visible = false;
|
||||
QtWaylandClient::QWaylandShmBuffer* initBuf = nullptr;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue