Product SiteDocumentation Site

A.13. wl_shell_surface - desktop style meta data interface

An interface implemented by a wl_surface. On server side the object is automatically destroyed when the related wl_surface is destroyed. On client side, wl_shell_surface_destroy() must be called before destroying the wl_surface object.

A.13.1. Requests provided by wl_shell_surface

A.13.1.1. wl_shell_surface::pong - respond to a ping event

A client must respond to a ping event with a pong request or the client may be deemed unresponsive.
wl_shell_surface::pong arguments
serial
Type: uint

A.13.1.2. wl_shell_surface::move

wl_shell_surface::move arguments
seat
Type: object
serial
Type: uint

A.13.1.3. wl_shell_surface::resize

wl_shell_surface::resize arguments
seat
Type: object
serial
Type: uint
edges
Type: uint

A.13.1.4. wl_shell_surface::set_toplevel - make the surface a top level surface

Make the surface a toplevel window.

A.13.1.5. wl_shell_surface::set_transient - make the surface a transient surface

Map the surface relative to an existing surface. The x and y arguments specify the locations of the upper left corner of the surface relative to the upper left corner of the parent surface. The flags argument controls overflow/clipping behaviour when the surface would intersect a screen edge, panel or such. And possibly whether the offset only determines the initial position or if the surface is locked to that relative position during moves.
wl_shell_surface::set_transient arguments
parent
Type: object
x
Type: int
y
Type: int
flags
Type: uint

A.13.1.6. wl_shell_surface::set_fullscreen - make the surface a fullscreen surface

Map the surface as a fullscreen surface. If an output parameter is given then the surface will be made fullscreen on that output. If the client does not specify the output then the compositor will apply its policy - usually choosing the output on which the surface has the biggest surface area.
The client may specify a method to resolve a size conflict between the output size and the surface size - this is provided through the fullscreen_method parameter.
The framerate parameter is used only when the fullscreen_method is set to "driver", to indicate the preferred framerate. framerate=0 indicates that the app does not care about framerate. The framerate is specified in mHz, that is framerate of 60000 is 60Hz.
The compositor must reply to this request with a configure event with the dimensions for the output on which the surface will be made fullscreen.
wl_shell_surface::set_fullscreen arguments
method
Type: uint
framerate
Type: uint
output
Type: object

A.13.1.7. wl_shell_surface::set_popup - make the surface a popup surface

Popup surfaces. Will switch an implicit grab into owner-events mode, and grab will continue after the implicit grab ends (button released). Once the implicit grab is over, the popup grab continues until the window is destroyed or a mouse button is pressed in any other clients window. A click in any of the clients surfaces is reported as normal, however, clicks in other clients surfaces will be discarded and trigger the callback.
TODO: Grab keyboard too, maybe just terminate on any click inside or outside the surface?
wl_shell_surface::set_popup arguments
seat
Type: object
serial
Type: uint
parent
Type: object
x
Type: int
y
Type: int
flags
Type: uint

A.13.1.8. wl_shell_surface::set_maximized - make the surface a maximized surface

A request from the client to notify the compositor the maximized operation. The compositor will reply with a configure event telling the expected new surface size. The operation is completed on the next buffer attach to this surface. A maximized client will fill the fullscreen of the output it is bound to, except the panel area. This is the main difference between a maximized shell surface and a fullscreen shell surface.
wl_shell_surface::set_maximized arguments
output
Type: object

A.13.1.9. wl_shell_surface::set_title - set surface title

wl_shell_surface::set_title arguments
title
Type: string

A.13.1.10. wl_shell_surface::set_class - set surface class

The surface class identifies the general class of applications to which the surface belongs. The class is the file name of the applications .desktop file (absolute path if non-standard location).
wl_shell_surface::set_class arguments
class_
Type: string