OSK deletes text with wl_keyboard instead of delete_surrounding_text from zwp_text_input_v3
Affected version
GNOME 40.2 Wayland
Bug summary
zwp_text_input_v3 provides the delete_surrounding_text event for deleting text. The GNOME OSK produces a wl_keyboard event instead.
Steps to reproduce
- Enable the OSK in the Accessibility settings.
- Start a GTK app with a text input with wayland debugging and filter the log for zwp_text_input and wl_keyboard events:
WAYLAND_DEBUG=1 gnome-disks 2>&1 | grep $'zwp_text_input\nwl_keyboard'
. - Focus a text input and enter and delete a character with the OSK.
What happened
zwp_text_input_v3@53.preedit_string(nil, 0, 0)
zwp_text_input_v3@53.commit_string("a")
zwp_text_input_v3@53.done(38)
-> zwp_text_input_v3@53.set_cursor_rectangle(160, 121, 0, 32)
-> zwp_text_input_v3@53.commit()
-> zwp_text_input_v3@53.set_surrounding_text("a", 1, 1)
-> zwp_text_input_v3@53.set_text_change_cause(0)
wl_keyboard@29.key(811, 44727706, 14, 1)
-> zwp_text_input_v3@53.set_cursor_rectangle(152, 121, 0, 32)
-> zwp_text_input_v3@53.commit()
What did you expect to happen
zwp_text_input_v3@53.preedit_string(nil, 0, 0)
zwp_text_input_v3@53.commit_string("a")
zwp_text_input_v3@53.done(38)
-> zwp_text_input_v3@53.set_cursor_rectangle(160, 121, 0, 32)
-> zwp_text_input_v3@53.commit()
-> zwp_text_input_v3@53.set_surrounding_text("a", 1, 1)
-> zwp_text_input_v3@53.set_text_change_cause(0)
zwp_text_input_v3@53.delete_surrounding_text(1, 0)
zwp_text_input_v3@53.done(39)
-> zwp_text_input_v3@53.set_cursor_rectangle(152, 121, 0, 32)
-> zwp_text_input_v3@53.commit()