Struct smithay::wayland::shell::xdg::XdgPopupSurfaceRoleAttributes[][src]

pub struct XdgPopupSurfaceRoleAttributes {
    pub configured: bool,
    pub configure_serial: Option<Serial>,
    pub initial_configure_sent: bool,
    pub parent: Option<WlSurface>,
    pub positioner: PositionerState,
    pub last_acked: Option<PopupState>,
    pub current: PopupState,
    pub server_pending: Option<PopupState>,
    // some fields omitted
}
Expand description

Role specific attributes for xdg_popup

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 client must call wl_surface.commit on the corresponding wl_surface for the xdg_popup state to take effect.

Fields

configured: bool

Defines if the surface has received at least one xdg_surface.ack_configure from the client

configure_serial: Option<Serial>

The serial of the last acked configure

initial_configure_sent: bool

Holds the state if the surface has sent the initial configure event to the client. It is expected that during the first commit a initial configure event is sent to the client

parent: Option<WlSurface>

Holds the parent for the xdg_popup.

The parent is allowed to remain unset as long as no commit has been requested for the underlying wl_surface. The parent can either be directly specified during xdg_surface.get_popup or using another protocol extension, for example xdg_layer_shell.

It is a protocol error to call commit on a wl_surface with the xdg_popup role when no parent is set.

positioner: PositionerState

The positioner state can be used by the compositor to calculate the best placement for the popup.

For example the compositor should prevent that a popup is placed outside the visible rectangle of a output.

last_acked: Option<PopupState>

Holds the last server_pending state that has been acknowledged by the client. This state should be cloned to the current during a commit.

current: PopupState

Holds the current state of the popup after a successful commit.

server_pending: Option<PopupState>

Holds the pending state as set by the server.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.