Data Fields
xdg_shell_listener Struct Reference

Create desktop-style surfaces. More...

#include <xdg-shell-client-protocol.h>

Data Fields

void(* ping )(void *data, struct xdg_shell *xdg_shell, uint32_t serial)
 Check if the client is alive.
 

Detailed Description

Create desktop-style surfaces.

xdg_shell allows clients to turn a wl_surface into a "real window" which can be dragged, resized, stacked, and moved around by the user. Everything about this interface is suited towards traditional desktop environments.

Field Documentation

◆ ping

void(* xdg_shell_listener::ping) (void *data, struct xdg_shell *xdg_shell, uint32_t serial)

Check if the client is alive.

The ping event asks the client if it's still alive. Pass the serial specified in the event back to the compositor by sending a "pong" request back with the specified serial.

Compositors can use this to determine if the client is still alive. It's unspecified what will happen if the client doesn't respond to the ping request, or in what timeframe. Clients should try to respond in a reasonable amount of time.

A compositor is free to ping in any way it wants, but a client must always respond to any xdg_shell object it created.

Parameters
serialPass this to the pong request