-
Notifications
You must be signed in to change notification settings - Fork 230
Description
Hello! Forwarding the issue here from YaLTeR/niri#3067.
For example, if a client application sends a sequence of requests zwp_text_input_v3::set_cursor_rectangle+zwp_text_input_v3::commit, Niri doesn't respond with a zwp_text_input_v3::done event until it needs to send a zwp_text_input_v3::preedit_text/commit_text event. According to the protocol specification, it makes impossible for client applications to send another zwp_text_input_v3::set_cursor_rectangle+zwp_text_input_v3::done if the caret position changes due to:
When the client receives a done event with a serial different than the number of past commit requests, it must proceed with evaluating and applying the changes as normal, except it should not change the current state of the zwp_text_input_v3 object. All pending state requests (set_surrounding_text, set_content_type and set_cursor_rectangle) on the zwp_text_input_v3 object should be sent and committed after receiving a zwp_text_input_v3.done event with a matching serial.
(it's a quote from the specification of zwp_text_input_v3::done)
That is, after a pair of zwp_text_input_v3::set_cursor_rectangle+zwp_text_input_v3::commit, clients mustn't send another one until a done is received. And this rule isn't restricted to set_cursor_rectangle only.
In the other words, the behavior should be adjusted so as to zwp_text_input_v3::done events are sent as soon as the Wayland compositor processes zwp_text_input_v3::commit requests from clients regardless of whether there are zwp_text_input_v3::preedit_text/commit_text events to send.
Steps to reproduce
- Install a 2025.3 release of any JetBrains IDE (it's important to use 2025.3 or higher, because earlier releases don't provide text-input-v3 support), e.g. the free IntelliJ IDEA Community Edition (https://www.jetbrains.com/idea/download/?section=linux).
- Press Ctrl+Shift+A -> start typing "Edit Custom VM Options..." and choose this option when it appears.
- In the opened dialog add the following line:
-Dawt.toolkit.name=WLToolkit. - Close the IDE.
- Launch it again from the terminal like this:
WAYLAND_DEBUG=1 idea | grep -E 'zwp_text_input_v3'. - Open a file in the IDE and start typing something but not using the input method - typing just regular latin characters is enough.
- After 1-2 typed characters you'll notice that the IDE stops sending
set_cursor_rectangle.
System Information
- niri version: 25.11
- Distro: Arch Linux 6.17.9
- fcitx5: 5.1.16
- GPU: unknown (unlikely matters)
- CPU: unknown (unlikely matters)