Phosphor.Lock.LockSurface: a QML window that is one output's ext_session_lock_surface_v1. More...
#include <PhosphorShellLock/LockSurfaceWindow.h>
Signals | |
| void | configuredChanged () |
| void | refused () |
| A show was refused because no session lock is held; the window hides itself right after. | |
Public Member Functions | |
| LockSurfaceWindow (QWindow *parent=nullptr) | |
| ~LockSurfaceWindow () override | |
| QScreen * | screen () const |
| The output this surface covers. | |
| void | setScreen (QScreen *screen) |
| bool | isConfigured () const |
| True once the compositor has sized the surface. | |
| bool | canExist () const |
| Whether a show right now would be honoured: a session lock is held or in flight. | |
Protected Member Functions | |
| void | showEvent (QShowEvent *event) override |
Phosphor.Lock.LockSurface: a QML window that is one output's ext_session_lock_surface_v1.
PerScreen { model: PhosphorShell.screens delegate: LockSurface { required property var phosphorScreen screen: phosphorScreen visible: lockController.surfacesWanted LockScreen { anchors.fill: parent } } }
A QQuickWindow marked through PhosphorWayland::LockSurface at construction, so the QPA plugin gives it the lock-surface role on screen when it is shown. The compositor sizes it (it always covers its output) and grants it keyboard focus by the protocol's own rules, which is why the content needs no focus request.
It refuses to exist while no session lock is held: PhosphorWayland:: SessionLock::canCreateSurfaces() is false outside lock() .. release, and a show in that state is refused (refused(), then the window hides itself) rather than mapped as some other kind of window. The lock's release unmaps every lock surface at the compositor, so the composer binds visible to the lock state and lets the window go with it.
|
explicit |
|
override |
|
nodiscard |
Whether a show right now would be honoured: a session lock is held or in flight.
|
signal |
|
nodiscard |
True once the compositor has sized the surface.
|
signal |
A show was refused because no session lock is held; the window hides itself right after.
|
nodiscard |
The output this surface covers.
Set before the first show; a null screen resolves to the primary one.
| void PhosphorShellLock::LockSurfaceWindow::setScreen | ( | QScreen * | screen | ) |
|
overrideprotected |