Marks a QWindow as an ext_session_lock_surface_v1 for one output. More...
#include <PhosphorWayland/LockSurface.h>
Signals | |
| void | screenChanged () |
| void | configuredChanged () |
Public Member Functions | |
| ~LockSurface () override | |
| void | setScreen (QScreen *screen) |
| The output this lock surface covers. | |
| QScreen * | screen () const |
| bool | isConfigured () const |
| True once the compositor has sized the surface and the window has taken that size. | |
Static Public Member Functions | |
| static LockSurface * | get (QWindow *window) |
Get or create the LockSurface for window. | |
| static LockSurface * | find (QWindow *window) |
The existing LockSurface for window, or nullptr. | |
| static bool | isSupported () |
| True iff the compositor advertises ext_session_lock_manager_v1. | |
Marks a QWindow as an ext_session_lock_surface_v1 for one output.
Pure Qt API, no Wayland types exposed. Call get() on a not-yet-shown window and set its screen; when the window is shown the QPA plugin creates the lock surface against the ext_session_lock_v1 that SessionLock currently holds, on the wl_output behind screen(). The compositor then sends the surface's exact size in a configure, which the plugin acks and applies to the window before its first frame; configured turns true once that has happened.
A lock surface can only exist while a lock is held or in flight (SessionLock::canCreateSurfaces()): shown outside that window, the QWindow gets no shell role and stays unmapped, which is the protocol's own answer. The compositor unmaps every lock surface when the lock is released; the window should then be hidden (destroying the surface) rather than reused.
One per window, parented to it. Threading: GUI thread only.
|
override |
|
signal |
|
static |
The existing LockSurface for window, or nullptr.
|
static |
Get or create the LockSurface for window.
Must be called BEFORE the window's first show(); returns nullptr when the window is already visible (its platform window has a different role by then).
|
nodiscard |
True once the compositor has sized the surface and the window has taken that size.
|
static |
True iff the compositor advertises ext_session_lock_manager_v1.
|
nodiscard |
|
signal |
| void PhosphorWayland::LockSurface::setScreen | ( | QScreen * | screen | ) |
The output this lock surface covers.
Immutable once the window is shown (the wl_output is bound at surface creation). A null screen resolves to the primary one.