\hypertarget{structxdg__popup__listener}{}\doxysection{xdg\+\_\+popup\+\_\+listener Struct Reference}
\label{structxdg__popup__listener}\index{xdg\_popup\_listener@{xdg\_popup\_listener}}


Short-\/lived popup surfaces for menus.  




{\ttfamily \#include $<$xdg-\/shell-\/client-\/protocol.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
void($\ast$ \mbox{\hyperlink{structxdg__popup__listener_af62aceff9bcec24ac9e5243107db53a2}{popup\+\_\+done}} )(void $\ast$data, struct xdg\+\_\+popup $\ast$xdg\+\_\+popup)
\begin{DoxyCompactList}\small\item\em Popup interaction is done. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Short-\/lived popup surfaces for menus. 

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. 

\doxysubsection{Field Documentation}
\mbox{\Hypertarget{structxdg__popup__listener_af62aceff9bcec24ac9e5243107db53a2}\label{structxdg__popup__listener_af62aceff9bcec24ac9e5243107db53a2}} 
\index{xdg\_popup\_listener@{xdg\_popup\_listener}!popup\_done@{popup\_done}}
\index{popup\_done@{popup\_done}!xdg\_popup\_listener@{xdg\_popup\_listener}}
\doxysubsubsection{\texorpdfstring{popup\_done}{popup\_done}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+popup\+\_\+listener\+::popup\+\_\+done) (void $\ast$data, struct xdg\+\_\+popup $\ast$xdg\+\_\+popup)}



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. 