\hypertarget{structxdg__popup__listener}{}\section{xdg\+\_\+popup\+\_\+listener Struct Reference}
\label{structxdg__popup__listener}\index{xdg\+\_\+popup\+\_\+listener@{xdg\+\_\+popup\+\_\+listener}}


xdg\+\_\+popup -\/ short-\/lived, popup surfaces for menus \+: popup interaction is done  


\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
void($\ast$ \hyperlink{structxdg__popup__listener_adbe21aa11a8b64c83bb69226f45e360e}{popup\+\_\+done} )(void $\ast$data, struct xdg\+\_\+popup $\ast$xdg\+\_\+popup)
\begin{DoxyCompactList}\small\item\em popup\+\_\+done -\/ popup interaction is done \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
xdg\+\_\+popup -\/ short-\/lived, popup surfaces for menus \+: popup interaction is done 

A popup surface is a short-\/lived, temporary surface that can be used to implement menus. It takes an explicit grab on the surface that will be dismissed when the user dismisses the popup. This can be done by the user clicking outside the surface, using the keyboard, or even locking the screen through closing the lid or a timeout.

When the popup is dismissed, a popup\+\_\+done event will be sent out, and at the same time the surface will be unmapped. The xdg\+\_\+popup object is now inert and cannot be reactivated, so clients should destroy it. Explicitly destroying the xdg\+\_\+popup object will also dismiss the popup and unmap the surface.

Clients will receive events for all their surfaces during this grab (which is an \char`\"{}owner-\/events\char`\"{} grab in X11 parlance). This is done so that users can navigate through submenus and other \char`\"{}nested\char`\"{} popup windows without having to dismiss the topmost popup.

Clients that want to dismiss the popup when another surface of their own is clicked should dismiss the popup using the destroy request.

The parent surface must have either an xdg\+\_\+surface or xdg\+\_\+popup role.

Specifying an xdg\+\_\+popup for the parent means that the popups are nested, with this popup now being the topmost popup. Nested popups must be destroyed in the reverse order they were created in, e.\+g. the only popup you are allowed to destroy at all times is the topmost one.

If there is an existing popup when creating a new popup, the parent must be the current topmost popup.

A parent surface must be mapped before the new popup is mapped.

When compositors choose to dismiss a popup, they will likely dismiss every nested popup as well. When a compositor dismisses popups, it will follow the same dismissing order as required from the client.

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\+\_\+shell.\+get\+\_\+xdg\+\_\+popup.

The client must call wl\+\_\+surface.\+commit on the corresponding wl\+\_\+surface for the xdg\+\_\+popup state to take effect.

For a surface to be mapped by the compositor the client must have committed both the xdg\+\_\+popup state and a buffer. 

\subsection{Field Documentation}
\hypertarget{structxdg__popup__listener_adbe21aa11a8b64c83bb69226f45e360e}{}\label{structxdg__popup__listener_adbe21aa11a8b64c83bb69226f45e360e} 
\index{xdg\+\_\+popup\+\_\+listener@{xdg\+\_\+popup\+\_\+listener}!popup\+\_\+done@{popup\+\_\+done}}
\index{popup\+\_\+done@{popup\+\_\+done}!xdg\+\_\+popup\+\_\+listener@{xdg\+\_\+popup\+\_\+listener}}
\subsubsection{\texorpdfstring{popup\+\_\+done}{popup\_done}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+popup\+\_\+listener\+::popup\+\_\+done)(void $\ast$data, struct xdg\+\_\+popup $\ast$xdg\+\_\+popup)}



popup\+\_\+done -\/ popup interaction is done 

The popup\+\_\+done event is sent out when a popup is dismissed by the compositor. The client should destroy the xdg\+\_\+popup object at this point. 