Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorShellLock::LockSurfaceWindow Class Reference

Phosphor.Lock.LockSurface: a QML window that is one output's ext_session_lock_surface_v1. More...

#include <PhosphorShellLock/LockSurfaceWindow.h>

Inheritance diagram for PhosphorShellLock::LockSurfaceWindow:
[legend]

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ LockSurfaceWindow()

PhosphorShellLock::LockSurfaceWindow::LockSurfaceWindow ( QWindow * parent = nullptr)
explicit

◆ ~LockSurfaceWindow()

PhosphorShellLock::LockSurfaceWindow::~LockSurfaceWindow ( )
override

Member Function Documentation

◆ canExist()

bool PhosphorShellLock::LockSurfaceWindow::canExist ( ) const
nodiscard

Whether a show right now would be honoured: a session lock is held or in flight.

◆ configuredChanged

void PhosphorShellLock::LockSurfaceWindow::configuredChanged ( )
signal

◆ isConfigured()

bool PhosphorShellLock::LockSurfaceWindow::isConfigured ( ) const
nodiscard

True once the compositor has sized the surface.

◆ refused

void PhosphorShellLock::LockSurfaceWindow::refused ( )
signal

A show was refused because no session lock is held; the window hides itself right after.

◆ screen()

QScreen * PhosphorShellLock::LockSurfaceWindow::screen ( ) const
nodiscard

The output this surface covers.

Set before the first show; a null screen resolves to the primary one.

◆ setScreen()

void PhosphorShellLock::LockSurfaceWindow::setScreen ( QScreen * screen)

◆ showEvent()

void PhosphorShellLock::LockSurfaceWindow::showEvent ( QShowEvent * event)
overrideprotected

The documentation for this class was generated from the following file: