Module xx_input_popup_surface_v2
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:
- client (Cl): popup = input_method.get_popup(wl_surface, positioner)
- Cl: wl_surface.commit()
- compositor (Co): popup.start_configure(150, 150, 10, -2, 5, 30)
- Co: input_method.done()
- Cl: ack_configure()
- 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:
- compositor (Co): input_method.enable()
- Co: input_method.done()
- [init sequence]
- Co: input_method.set_surrounding_text(“new text”)
- Co: popup.start_configure(150, 150, -60, -2, 55, 30)
- Co: input_method.done()
- client (Cl): ack_configure()
- 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§
- XxInput
Popup Surface V2 - popup surface
Enums§
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