Class XdgPopup

short-lived, popup surfaces for menus

class XdgPopup
  : wayland.client.core.WlProxy ;

A popup surface is a short-lived, temporary surface. It can be used to implement for example menus, popovers, tooltips and other similar user interface concepts.

A popup can be made to take an explicit grab. See xdg_popup.grab for details.

When the popup is dismissed, a popup_done event will be sent out, and at the same time the surface will be unmapped. See the xdg_popup.popup_done event for details.

Explicitly destroying the xdg_popup object will also dismiss the popup and unmap the surface. Clients that want to dismiss the popup when another surface of their own is clicked should dismiss the popup using the destroy request.

A newly created xdg_popup will be stacked on top of all previously created xdg_popup surfaces associated with the same xdg_toplevel.

The parent of an xdg_popup must be mapped (see the xdg_surface description) before the xdg_popup itself.

The x and y arguments passed when creating the popup object specify where the top left of the popup should be placed, relative to the local surface coordinates of the parent surface. See xdg_surface.get_popup. An xdg_popup must intersect with or be at least partially adjacent to its parent surface.

The client must call wl_surface.commit on the corresponding wl_surface for the xdg_popup state to take effect.

Properties

NameTypeDescription
iface[get] immutable(wayland.client.core.WlProxyInterface)Interface object that creates XdgPopup objects.
onConfigure[set] void delegate(XdgPopup, int, int, int, int)configure the popup surface
onPopupDone[set] void delegate(XdgPopup)popup interaction is done

Methods

NameDescription
destroy () remove xdg_popup interface
grab (seat, serial) make the popup take an explicit grab

Enums

NameDescription
Error

Aliases

NameDescription
OnConfigureEventDg Event delegate signature of XdgPopup.onConfigure.
OnPopupDoneEventDg Event delegate signature of XdgPopup.onPopupDone.