#1146833 OSK unfolds way too often as gtk4 sends too many text_input.enable() events

Package:
libgtk-4-1
Source:
libgtk-4-1
Description:
GTK graphical user interface library
Submitter:
Guido Günther
Date:
2026-09-06 18:59:01 UTC
Severity:
normal
Tags:
#1146833#5
Date:
2026-09-06 07:36:38 UTC
From:
To:
gtk 4.23.1 (and later) sends zwp_text_input_v3#57.enable() enable events
not only when focusing input fields (like GtkEntry) but also when
e.g. touching in the demo selection in gtk4-demo (and many other
places):

[3397846.921] {Default Queue}  -> zwp_text_input_v3#57.enable()
[3397846.965] {Default Queue}  -> zwp_text_input_v3#57.set_surrounding_text("", 0, 0)
[3397846.979] {Default Queue}  -> zwp_text_input_v3#57.set_text_change_cause(1)
[3397847.111] {Default Queue}  -> zwp_text_input_v3#57.set_content_type(0, 0)
[3397847.146] {Default Queue}  -> zwp_text_input_v3#57.set_cursor_rectangle(0, 0, 0, 0)

This leads to the OSK unfolding on each enable (in e.g. Phosh) making
the apps mostly unusable.

The text-input protocol bound is still version 1 though:
[3566470.552] {Default Queue} wl_registry#2.global(25, "zwp_text_input_manager_v3", 1)
This does not happen in older GTK4 versions like 4.22.4

As this makes using any GTK4 app on touch systems mostly impossible to
use, I picked a severe severity to keep it out of testing for the moment
(please adjust as appropriate). I hope to get around to look into a fix
soon.

Upstream reference:

https://gitlab.gnome.org/GNOME/gtk/-/work_items/8349

Cheers,
 -- Guido