forked from quickshell/quickshell
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
20
src/wayland/session_lock/shell_integration.cpp
Normal file
20
src/wayland/session_lock/shell_integration.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "shell_integration.hpp"
|
||||
|
||||
#include <private/qwaylandshellsurface_p.h>
|
||||
#include <private/qwaylandwindow_p.h>
|
||||
#include <qlogging.h>
|
||||
|
||||
#include "session_lock.hpp"
|
||||
#include "surface.hpp"
|
||||
|
||||
QtWaylandClient::QWaylandShellSurface*
|
||||
QSWaylandSessionLockIntegration::createShellSurface(QtWaylandClient::QWaylandWindow* window) {
|
||||
auto* lock = LockWindowExtension::get(window->window());
|
||||
if (lock == nullptr || lock->surface == nullptr || !lock->surface->isExposed()) {
|
||||
qFatal() << "Visibility canary failed. A window with a LockWindowExtension MUST be set to "
|
||||
"visible via LockWindowExtension::setVisible";
|
||||
throw nullptr;
|
||||
}
|
||||
|
||||
return lock->surface;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue