XdgToplevel QML Type | Qt Wayland Compositor | Qt 6.10.3
Description: XdgToplevel represents the toplevel window specific parts of an xdg surface.

- Qt 6.10
- Qt Wayland Compositor
- QML Types
- QtWayland.Compositor.XdgShell
- XdgToplevel
- Qt Wayland Compositor | Commercial or GPLv3

# XdgToplevel QML Type

XdgToplevel represents the toplevel window specific parts of an xdg surface. More...

Import Statement: | `import QtWayland.Compositor.XdgShell`
In C++: | QWaylandXdgToplevel

- List of all members, including inherited members

## Properties

- activated : bool
- appId : string
- decorationMode : enumeration
- fullscreen : bool
- maxSize : size
- maximized : bool
- minSize : size
- modal : bool `(since 6.8)`
- parentToplevel : XdgToplevel
- resizing : bool
- title : string
- xdgSurface : XdgSurface

## Methods

- void sendClose()
- int sendConfigure(size size, list<int> states)
- void sendFullscreen(size size)
- void sendMaximized(size size)
- void sendResizing(size maxSize)
- void sendUnmaximized(size size)
- size sizeForResize(size size, point delta, uint edges)

## Detailed Description

This type is part of the XdgShell extension and provides a way to extend the functionality of an XdgSurface with features specific to desktop-style windows.

It corresponds to the Wayland interface `xdg_toplevel`.

## Property Documentation

activated : bool `[read-only]`

This property holds whether toplevel is drawing itself as having input focus.

appId : string `[read-only]`

This property holds the app id of the XdgToplevel.

decorationMode : enumeration `[read-only]`

This property holds the current window decoration mode for this toplevel.

The possible values are:

Constant | Description
--- | ---
`XdgToplevel.ServerSideDecoration` | The compositor should draw window decorations.
`XdgToplevel.ClientSideDecoration` | The client should draw window decorations.

See also XdgDecorationManagerV1.

fullscreen : bool `[read-only]`

This property holds whether the client has acknowledged that it should be fullscreen.

maxSize : size `[read-only]`

This property holds the maximum size of the XdgToplevel as requested by the client.

The compositor is free to ignore this value and request a larger size.

maximized : bool `[read-only]`

This property holds whether the client has acknowledged that it should be maximized.

minSize : size `[read-only]`

This property holds the minimum size of the XdgToplevel as requested by the client.

The compositor is free to ignore this value and request a smaller size.

modal : bool `[read-only, since 6.8]`

This property holds whether toplevel blocks other windows from receiving input.

This property was introduced in Qt 6.8.

parentToplevel : XdgToplevel `[read-only]`

This property holds the XdgToplevel parent of this XdgToplevel.

resizing : bool `[read-only]`

This property holds whether the client has acknowledged that it is being resized.

title : string `[read-only]`

This property holds the title of the XdgToplevel.

xdgSurface : XdgSurface `[read-only]`

This property holds the XdgSurface for this XdgToplevel.

## Method Documentation

void sendClose()

Sends a close event to the client. The client may choose to ignore the event.

int sendConfigure(size size, list<int> states)

Sends a configure event to the client. size contains the pixel size of the surface. A size of zero means the client is free to decide the size. Known states are enumerated in XdgToplevel::State.

void sendFullscreen(size size)

Convenience for sending a configure event with the fullscreen state set, and maximized and resizing removed. The activated state is left in its current state.

size is the new size of the window.

See also sendUnmaximized.

void sendMaximized(size size)

Convenience for sending a configure event with the maximized state set, and fullscreen and resizing removed. The activated state is left in its current state.

size is the new size of the window.

void sendResizing(size maxSize)

Convenience for sending a configure event with the resizing state set, and maximized and fullscreen removed. The activated state is left in its current state.

maxSize is the new size of the window.

void sendUnmaximized(size size)

Convenience for sending a configure event with the maximized, fullscreen and resizing states removed, and fullscreen and resizing removed. The activated state is left in its current state.

size is the new size of the window. If size is zero, the client decides the size.

size sizeForResize(size size, point delta, uint edges)

Convenience for computing the new size given the current size, a delta, and the edges active in the drag.