A single toplevel window owned by some other Wayland client. More...
#include <phosphor-wayland/include/PhosphorWayland/ForeignToplevel.h>
Signals | |
| void | titleChanged () |
| void | appIdChanged () |
| void | stateChanged () |
| void | outputsChanged () |
| void | parentToplevelChanged () |
| void | closedChanged () |
Public Member Functions | |
| ~ForeignToplevel () override | |
| QString | title () const |
| QString | appId () const |
| bool | isMaximized () const |
| bool | isMinimized () const |
| bool | isActivated () const |
| bool | isFullscreen () const |
| QList< QScreen * > | outputs () const |
| ForeignToplevel * | parentToplevel () const |
| bool | isClosed () const |
| void | activate () |
| Request the compositor focus this toplevel. | |
| void | close () |
| Request the compositor close this toplevel. | |
| void | setMaximized (bool maximized) |
| void | setMinimized (bool minimized) |
| void | setFullscreen (bool fullscreen, QScreen *output=nullptr) |
| Toggle fullscreen on the given output (null = compositor's choice). | |
| void | setRectangle (QWindow *surface, const QRect &rect) |
| Tell the compositor where on screen this toplevel's representation lives (e.g. | |
A single toplevel window owned by some other Wayland client.
Surfaces the protocol's title / app_id / state / output / parent events as Q_PROPERTYs and the activate / close / set_maximized / set_minimized / set_fullscreen / set_rectangle requests as Q_INVOKABLE methods. Owned by ForeignToplevelManager; never construct directly.
State changes are coalesced — the protocol sends a done event after a batch of property updates, and we only fire the change signals at that point. This matches xdg-shell's configure semantics and lets QML bindings re-evaluate once per logical update instead of N times per frame for active windows that get rapid updates.
|
override |
| void PhosphorWayland::ForeignToplevel::activate | ( | ) |
Request the compositor focus this toplevel.
Always uses the first seat returned by Qt's QtWaylandClient::QWaylandDisplay (typically the only seat on single-user systems). Multi-seat selection is not currently exposed — adding a QObject* seat parameter would be a future API extension if a real consumer needs it.
| QString PhosphorWayland::ForeignToplevel::appId | ( | ) | const |
|
signal |
| void PhosphorWayland::ForeignToplevel::close | ( | ) |
Request the compositor close this toplevel.
Equivalent to clicking the X button — the owning client decides whether to honour it (some show "save changes?" dialogs first).
|
signal |
| bool PhosphorWayland::ForeignToplevel::isActivated | ( | ) | const |
| bool PhosphorWayland::ForeignToplevel::isClosed | ( | ) | const |
| bool PhosphorWayland::ForeignToplevel::isFullscreen | ( | ) | const |
| bool PhosphorWayland::ForeignToplevel::isMaximized | ( | ) | const |
| bool PhosphorWayland::ForeignToplevel::isMinimized | ( | ) | const |
| QList< QScreen * > PhosphorWayland::ForeignToplevel::outputs | ( | ) | const |
|
signal |
| ForeignToplevel * PhosphorWayland::ForeignToplevel::parentToplevel | ( | ) | const |
|
signal |
| void PhosphorWayland::ForeignToplevel::setFullscreen | ( | bool | fullscreen, |
| QScreen * | output = nullptr |
||
| ) |
Toggle fullscreen on the given output (null = compositor's choice).
output is silently ignored when fullscreen=false — the protocol has separate set/unset requests and unset_fullscreen carries no output argument. Requires zwlr_foreign_toplevel_manager_v1 version >= 2; on older compositors this is silently a no-op.
| void PhosphorWayland::ForeignToplevel::setMaximized | ( | bool | maximized | ) |
| void PhosphorWayland::ForeignToplevel::setMinimized | ( | bool | minimized | ) |
| void PhosphorWayland::ForeignToplevel::setRectangle | ( | QWindow * | surface, |
| const QRect & | rect | ||
| ) |
Tell the compositor where on screen this toplevel's representation lives (e.g.
its taskbar entry). The compositor uses this to anchor minimize / unminimize animations. surface must be a QWindow that's currently mapped to a wl_surface; the rectangle is surface-local (not screen-local). QML callers wanting to anchor to a QQuickItem should pass item.Window.window and pre-map the rect via mapToScene().
|
signal |
| QString PhosphorWayland::ForeignToplevel::title | ( | ) | const |
|
signal |