xdg_surface - desktop-style metadata interface : suggest a surface change : surface wants to be closed More...
Data Fields | |
| void(* | configure )(void *data, struct xdg_surface *xdg_surface, int32_t width, int32_t height, struct wl_array *states, uint32_t serial) |
| configure - suggest a surface change : (none) : (none) : (none) : (none) More... | |
| void(* | close )(void *data, struct xdg_surface *xdg_surface) |
| close - surface wants to be closed More... | |
xdg_surface - desktop-style metadata interface : suggest a surface change : surface wants to be closed
An interface that may be implemented by a wl_surface, for implementations that provide a desktop-style user interface.
It provides requests to treat surfaces like windows, allowing to set properties like maximized, fullscreen, minimized, and to move and resize them, and associate metadata like title and app id.
On the server side the object is automatically destroyed when the related wl_surface is destroyed. On client side, xdg_surface.destroy() must be called before destroying the wl_surface object.
| void(* xdg_surface_listener::configure) (void *data, struct xdg_surface *xdg_surface, int32_t width, int32_t height, struct wl_array *states, uint32_t serial) |
configure - suggest a surface change : (none) : (none) : (none) : (none)
The configure event asks the client to resize its surface.
The width and height arguments specify a hint to the window about how its surface should be resized in window geometry coordinates. The states listed in the event specify how the width/height arguments should be interpreted.
A client should arrange a new surface, and then send a ack_configure request with the serial sent in this configure event before attaching a new surface.
If the client receives multiple configure events before it can respond to one, it is free to discard all but the last event it received.
| void(* xdg_surface_listener::close) (void *data, struct xdg_surface *xdg_surface) |
close - surface wants to be closed
The close event is sent by the compositor when the user wants the surface to be closed. This should be equivalent to the user clicking the close button in client-side decorations, if your application has any...
This is only a request that the user intends to close your window. The client may choose to ignore this request, or show a dialog to ask the user to save their data...