Popup.present

bool present(int width, int height, gdk.popup_layout.PopupLayout layout)

Present popup after having processed the [gdk.popup_layout.PopupLayout] rules.

If the popup was previously now showing, it will be showed, otherwise it will change position according to layout.

After calling this function, the result should be handled in response to the [gdk.surface.Surface.layout] signal being emitted. The resulting popup position can be queried using [gdk.popup.Popup.getPositionX], [gdk.popup.Popup.getPositionY], and the resulting size will be sent as parameters in the layout signal. Use [gdk.popup.Popup.getRectAnchor] and [gdk.popup.Popup.getSurfaceAnchor] to get the resulting anchors.

Presenting may fail, for example if the popup is set to autohide and is immediately hidden upon being presented. If presenting failed, the [gdk.surface.Surface.layout] signal will not me emitted.

Parameters

widththe unconstrained popup width to layout
heightthe unconstrained popup height to layout
layoutthe [gdk.popup_layout.PopupLayout] object used to layout

Returns

false if it failed to be presented, otherwise true.