Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorLayer::ITransportHandle Class Referenceabstract

Handle returned by attach(); lets the caller mutate post-show properties that the wlr-layer-shell protocol permits (margins, layer, exclusive zone, keyboard interactivity) without re-attaching. More...

#include <phosphor-layer/include/PhosphorLayer/ILayerShellTransport.h>

Public Member Functions

 ITransportHandle ()=default
 
virtual ~ITransportHandle ()=default
 
virtual QQuickWindow * window () const =0
 Window this handle controls.
 
virtual bool isConfigured () const =0
 True once the compositor has sent its initial configure event.
 
virtual QSize configuredSize () const =0
 Cached last-known pixel size from the compositor's configure event.
 
Post-show mutable properties

Per wlr-layer-shell v4+.

Values are committed immediately.

setAnchors is permitted on compositors implementing wlr-layer-shell v2+ (the surface stays attached and reconfigures in place). On transports lacking this capability (xdg_toplevel fallback, older compositors) the call is silently ignored — consumers that rely on dynamic re-anchoring should check isConfigured() after the next commit and fall back to destroy-and-recreate if needed.

virtual void setMargins (QMargins m)=0
 
virtual void setLayer (Layer l)=0
 
virtual void setExclusiveZone (int z)=0
 
virtual void setKeyboardInteractivity (KeyboardInteractivity k)=0
 
virtual void setAnchors (Anchors a)=0
 
virtual void setDesiredSize (QSize size)=0
 Push a desired surface size into the layer-shell set_size request, independent of QQuickWindow::size().
 

Detailed Description

Handle returned by attach(); lets the caller mutate post-show properties that the wlr-layer-shell protocol permits (margins, layer, exclusive zone, keyboard interactivity) without re-attaching.

Ownership: the caller of attach() owns the handle. Destroying the handle detaches the layer-shell role from the window and releases protocol resources.

Constructor & Destructor Documentation

◆ ITransportHandle()

PhosphorLayer::ITransportHandle::ITransportHandle ( )
default

◆ ~ITransportHandle()

virtual PhosphorLayer::ITransportHandle::~ITransportHandle ( )
virtualdefault

Member Function Documentation

◆ configuredSize()

virtual QSize PhosphorLayer::ITransportHandle::configuredSize ( ) const
pure virtual

Cached last-known pixel size from the compositor's configure event.

Zero before isConfigured() returns true.

◆ isConfigured()

virtual bool PhosphorLayer::ITransportHandle::isConfigured ( ) const
pure virtual

True once the compositor has sent its initial configure event.

Consumers should gate geometry queries on this to avoid reading pre-configure values.

◆ setAnchors()

virtual void PhosphorLayer::ITransportHandle::setAnchors ( Anchors  a)
pure virtual

◆ setDesiredSize()

virtual void PhosphorLayer::ITransportHandle::setDesiredSize ( QSize  size)
pure virtual

Push a desired surface size into the layer-shell set_size request, independent of QQuickWindow::size().

Use this for client-initiated resizes after the initial configure: calling QWindow::resize() from app code is silently clamped against windowMinimumSize/ windowMaximumSize on Qt 6 (QTBUG-118604), so the wl_egl_window stays pinned at the old dimensions even though the app thinks it resized. Setting a desired size routes the new value through the protocol directly; the compositor's configure reply then drives Qt's resize-from-configure path, which bypasses the clamp.

Default-constructed QSize() clears the override and falls back to qwindow->size() (preserving xdg-toplevel-style behaviour).

◆ setExclusiveZone()

virtual void PhosphorLayer::ITransportHandle::setExclusiveZone ( int  z)
pure virtual

◆ setKeyboardInteractivity()

virtual void PhosphorLayer::ITransportHandle::setKeyboardInteractivity ( KeyboardInteractivity  k)
pure virtual

◆ setLayer()

virtual void PhosphorLayer::ITransportHandle::setLayer ( Layer  l)
pure virtual

◆ setMargins()

virtual void PhosphorLayer::ITransportHandle::setMargins ( QMargins  m)
pure virtual

◆ window()

virtual QQuickWindow * PhosphorLayer::ITransportHandle::window ( ) const
pure virtual

Window this handle controls.


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