Module xx_input_popup_surface_v2

Available on crate feature wayland and Linux only.
Expand description

popup surface

An input method popup surface is a short-lived, temporary surface. It is meant as an area to show suggestions, candidates, or for other input-related uses.

The compositor should anchor it at the active text input cursor area.

The client must call wl_surface.commit on the corresponding wl_surface for input_popup_surface state updates to take effect, unless otherwise noted.

After the initial wl_surface.commit, the compositor must reply with a configure sequence (see .start_configure) initializing all the compositor-provided state of the popup. That means providing values for:

  • width
  • height
  • anchor_x
  • anchor_y
  • anchor_width
  • anchor_height
  • serial

using the appropriate events.

The popup will only be presented to the user after the client receives the configure sequence and replies with .ack_configure.

An example init sequence could look like this:

  1. client (Cl): popup = input_method.get_popup(wl_surface, positioner)
  2. Cl: wl_surface.commit()
  3. compositor (Co): popup.start_configure(150, 150, 10, -2, 5, 30)
  4. Co: input_method.done()
  5. Cl: ack_configure()
  6. Cl: wl_surface.commit()

A newly created input_popup_surface will be stacked on top of all previously created input_popup_surfaces associated with the same text input.

A typical sequence resulting from the user selecting a new text field and typing some text:

  1. compositor (Co): input_method.enable()
  2. Co: input_method.done()
  3. [init sequence]
  4. Co: input_method.set_surrounding_text(“new text”)
  5. Co: popup.start_configure(150, 150, -60, -2, 55, 30)
  6. Co: input_method.done()
  7. client (Cl): ack_configure()
  8. Cl: wl_surface.commit()

When the corresponding input_method receives a commited .disable event, the popup gets destroyed and becomes invalid and its surface gets unmapped.

The client must not destroy the underlying wl_surface while the xx_input_popup_surface_v2 object exists.

Structs§

XxInputPopupSurfaceV2
popup surface

Enums§

Error
Event
Request

Constants§

EVT_REPOSITIONED_OPCODE
The wire opcode for this event
EVT_REPOSITIONED_SINCE
The minimal object version supporting this event
EVT_START_CONFIGURE_OPCODE
The wire opcode for this event
EVT_START_CONFIGURE_SINCE
The minimal object version supporting this event
REQ_ACK_CONFIGURE_OPCODE
The wire opcode for this request
REQ_ACK_CONFIGURE_SINCE
The minimal object version supporting this request
REQ_DESTROY_OPCODE
The wire opcode for this request
REQ_DESTROY_SINCE
The minimal object version supporting this request
REQ_REPOSITION_OPCODE
The wire opcode for this request
REQ_REPOSITION_SINCE
The minimal object version supporting this request