canonical / mir

The Mir compositor
GNU General Public License v2.0
627 stars 100 forks source link

OSK hides a half second after popping up on some input fields with `zwp_text_input_v1` (Electron) #3580

Open Saviq opened 1 month ago

Saviq commented 1 month ago

Steps:

Expected:

Current:

Even though the there's a lot of traffic, nothing in the client wayland requests suggests it should be hiding:

[4063403.674]  -> zwp_text_input_v1@23.reset()
[4063414.767]  -> zwp_text_input_v1@23.reset()
[4063418.886]  -> zwp_text_input_v1@23.activate(wl_seat@10, wl_surface@21)
[4063418.907]  -> zwp_text_input_v1@23.set_content_type(4, 3)
[4063419.005]  -> zwp_text_input_v1@23.show_input_panel()
[4063419.051]  -> zwp_text_input_v1@23.set_cursor_rectangle(1022, 354, 246, 236)
[4063419.086]  -> zwp_text_input_v1@23.set_surrounding_text("1", 1, 1)
[4063419.253]  -> zwp_text_input_v1@23.set_cursor_rectangle(1022, 354, 246, 236)
[4063419.343]  -> zwp_text_input_v1@23.set_cursor_rectangle(1010, 513, 0, 20)
[4063419.378]  -> zwp_text_input_v1@23.reset()
[4063419.461]  -> zwp_text_input_v1@23.show_input_panel()
[4063419.471]  -> zwp_text_input_v1@23.set_cursor_rectangle(1010, 513, 0, 20)
[4063419.497]  -> zwp_text_input_v1@23.set_cursor_rectangle(1010, 513, 0, 20)
[4063419.510]  -> zwp_text_input_v1@23.set_surrounding_text("1", 0, 1)
[4063419.542]  -> zwp_text_input_v1@23.set_cursor_rectangle(1010, 513, 0, 20)
[4063419.603] zwp_text_input_v1@23.leave()
[4063419.615] zwp_text_input_v1@23.enter(wl_surface@21)
[4063419.633]  -> zwp_text_input_v1@23.set_cursor_rectangle(1003, 513, 7, 20)
[4063421.949]  -> zwp_text_input_v1@23.set_cursor_rectangle(1003, 513, 7, 20)
[4063422.271]  -> zwp_text_input_v1@23.set_cursor_rectangle(1003, 513, 7, 20)
[4063519.588]  -> zwp_text_input_v1@23.show_input_panel()
[4063519.610]  -> zwp_text_input_v1@23.set_cursor_rectangle(1003, 513, 7, 20)
[4063622.079]  -> zwp_text_input_v1@23.set_cursor_rectangle(1003, 513, 7, 20)
[4063622.377]  -> zwp_text_input_v1@23.set_cursor_rectangle(1003, 513, 7, 20)
tarek-y-ismail commented 16 hours ago

Looking at the client and server wayland debug logs, nothing seems out of the ordinary. I even sprinkled some debug printfs in places where I suspected things were off (text_input_unstable_v1), but again nothing seems incorrect. Running twice, activating a normal field, and one of the broken number fields the other time shows almost the exact same log, except for an extra text_input_unstable_v1.activate.

As a sanity check, I made the compositor treat all fields the same as the number field (by hardcoding the hint and purpose, see text_input_v1.set_content_type), all fields behave as expected (keyboard pops up on activation with the number pad) except the broken ones (same buggy behavior as before).

I haven't been able to get other keyboards to work (maliit, squeekboard, or wvkbd (this one is exclusive to wlroots anyway)), so it's not clear whether the issue is from the OSK or the client.

Checking the squeekboard issue list on Gitlab, I couldn't find any issues related to this behavior. Nor could I find anything related to electron other than us