Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Saviq opened this issue Aug 30, 2024 · 6 comments · May be fixed by #3681
Open

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

Saviq opened this issue Aug 30, 2024 · 6 comments · May be fixed by #3681
Assignees
Labels
bug triaged Triage into JIRA to plan it in

Comments

@Saviq
Copy link
Collaborator

Saviq commented Aug 30, 2024

Steps:

Expected:

  • OSK pops up and stays up

Current:

  • OSK pops up and quickly hides again

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

[4063403.674]  -> [email protected]()
[4063414.767]  -> [email protected]()
[4063418.886]  -> [email protected](wl_seat@10, wl_surface@21)
[4063418.907]  -> [email protected]_content_type(4, 3)
[4063419.005]  -> [email protected]_input_panel()
[4063419.051]  -> [email protected]_cursor_rectangle(1022, 354, 246, 236)
[4063419.086]  -> [email protected]_surrounding_text("1", 1, 1)
[4063419.253]  -> [email protected]_cursor_rectangle(1022, 354, 246, 236)
[4063419.343]  -> [email protected]_cursor_rectangle(1010, 513, 0, 20)
[4063419.378]  -> [email protected]()
[4063419.461]  -> [email protected]_input_panel()
[4063419.471]  -> [email protected]_cursor_rectangle(1010, 513, 0, 20)
[4063419.497]  -> [email protected]_cursor_rectangle(1010, 513, 0, 20)
[4063419.510]  -> [email protected]_surrounding_text("1", 0, 1)
[4063419.542]  -> [email protected]_cursor_rectangle(1010, 513, 0, 20)
[4063419.603] [email protected]()
[4063419.615] [email protected](wl_surface@21)
[4063419.633]  -> [email protected]_cursor_rectangle(1003, 513, 7, 20)
[4063421.949]  -> [email protected]_cursor_rectangle(1003, 513, 7, 20)
[4063422.271]  -> [email protected]_cursor_rectangle(1003, 513, 7, 20)
[4063519.588]  -> [email protected]_input_panel()
[4063519.610]  -> [email protected]_cursor_rectangle(1003, 513, 7, 20)
[4063622.079]  -> [email protected]_cursor_rectangle(1003, 513, 7, 20)
[4063622.377]  -> [email protected]_cursor_rectangle(1003, 513, 7, 20)
@Saviq Saviq added the bug label Aug 30, 2024
@tarek-y-ismail tarek-y-ismail added the triaged Triage into JIRA to plan it in label Oct 16, 2024
@tarek-y-ismail tarek-y-ismail self-assigned this Oct 16, 2024
@tarek-y-ismail
Copy link
Contributor

tarek-y-ismail commented Oct 18, 2024

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

@tarek-y-ismail
Copy link
Contributor

The next logical step would be to build a local version of chromium to be able to debug it.

@AlanGriffiths
Copy link
Collaborator

From your earlier comment, you've established that there is nothing suspicious in the communication between the test client (which, incidentally, isn't chromium) and the compositor.

The next logical step is to check the communication between Mir and the OSK (zwp_input_method I guess). Either Mir is telling the OSK to dismiss, or the OSK is hiding without being told. In the first case, the bug is in Mir, in the second in Squeekboard.

The next logical step would be to build a local version of chromium to be able to debug it.

Unless you have established that chromium is not following the protocol and, therefore, know what to look for that seems unlikely to help.

@tarek-y-ismail
Copy link
Contributor

you've established that there is nothing suspicious in the communication between the test client (which, incidentally, isn't chromium)

Isn't the example running on electron (which is pretty much chromium + other stuff)? Either way, now that I think about it more, I kinda agree that maybe another look at the Mir/keyboard side would a better start (faster than compiling electron, that's for sure :))

The next logical step is to check the communication between Mir and the OSK (zwp_input_method I guess).

From what I remember, I already went through the code for input_method and did some debug logging as a sanity check and found no suspicious things (other than an extra show call if I remember correctly). I haven't been able to get other keyboards running, so it may be an issue with squeekboard. That should be a good (re)starting point.

@AlanGriffiths
Copy link
Collaborator

From what I remember, I already went through the code for input_method and did some debug logging as a sanity check and found no suspicious things (other than an extra show call if I remember correctly). I haven't been able to get other keyboards running, so it may be an issue with squeekboard. That should be a good (re)starting point.

I meant check the WAYLAND_DEBUG on the OSK: See what message the OSK is getting. (The reference above is to an extra activate on the client side, not a show on the OSK side.)

@tarek-y-ismail
Copy link
Contributor

@Saviq Issue still occurs with latest squeekboard/ubuntu-frame-osk and no workaround applied. The logs look a bit different though.

log

The first few "Gtk-CRITICAL ... new configuration without asking" blocks are printed when focusing on normal text fields, the last two or so are printed when focusing on the "Interval" field.

Setting input sources to [('xkb', 'us')]

(squeekboard:351378): Gtk-WARNING **: 10:36:26.805: Failed to parse /etc/gtk-3.0/settings.ini: Permission denied
thread '<unnamed>' panicked at /root/parts/squeekboard/src/src/actors/external/debug.rs:64:20:
called `Result::unwrap()` on an `Err` value: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Can't connect to the bus: Could not connect: Permission denied. Visibility switching unavailable.
** (squeekboard:351378): WARNING **: 10:36:26.910: Could not connect to session manager: Could not connect: Permission denied

Surprise: Could not track screensaver status, giving up: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })

** (squeekboard:351378): WARNING **: 10:36:26.920: Failed to init libfeedback: Could not connect: Permission denied

(squeekboard:351378): Gtk-CRITICAL **: 10:36:26.984: gtk_window_resize: assertion 'width > 0' failed
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: us_wide
Surprise: Panel received new configuration without asking

(squeekboard:351378): Gtk-CRITICAL **: 10:36:33.222: gtk_window_resize: assertion 'width > 0' failed
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: us_wide
Surprise: Panel received new configuration without asking

(squeekboard:351378): Gtk-CRITICAL **: 10:36:49.556: gtk_window_resize: assertion 'width > 0' failed
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: us_wide
Surprise: Panel received new configuration without asking

(squeekboard:351378): Gtk-CRITICAL **: 10:36:50.872: gtk_window_resize: assertion 'width > 0' failed
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: us_wide
Surprise: Panel received new configuration without asking

(squeekboard:351378): Gtk-CRITICAL **: 10:36:57.756: gtk_window_resize: assertion 'width > 0' failed
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: us_wide
Surprise: Panel received new configuration without asking

(squeekboard:351378): Gtk-CRITICAL **: 10:37:02.046: gtk_window_resize: assertion 'width > 0' failed
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/number/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: number/us_wide
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: us_wide
Surprise: Panel received new configuration without asking

(squeekboard:351378): Gtk-CRITICAL **: 10:37:05.541: gtk_window_resize: assertion 'width > 0' failed
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/number/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: number/us_wide
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: us_wide
Surprise: Panel received new configuration without asking

(squeekboard:351378): Gtk-CRITICAL **: 10:37:09.373: gtk_window_resize: assertion 'width > 0' failed
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/number/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: number/us_wide
Debug: Tried file "/var/snap/ubuntu-frame-osk/common/squeekboard/keyboards/us_wide.yaml", but it's missing: No such file or directory (os error 2)
Info: Loaded layout Resource: us_wide
Surprise: Panel received new configuration without asking
Debug: Tried to remove global 1b but it is not registered as an output: NotFound
Debug: Tried to remove global 19 but it is not registered as an output: NotFound
Debug: Tried to remove global 17 but it is not registered as an output: NotFound
Debug: Tried to remove global 18 but it is not registered as an output: NotFound
Debug: Tried to remove global 16 but it is not registered as an output: NotFound
Debug: Tried to remove global 15 but it is not registered as an output: NotFound
Debug: Tried to remove global 14 but it is not registered as an output: NotFound
Debug: Tried to remove global 13 but it is not registered as an output: NotFound
Debug: Tried to remove global 12 but it is not registered as an output: NotFound
Debug: Tried to remove global 5 but it is not registered as an output: NotFound
Debug: Tried to remove global 6 but it is not registered as an output: NotFound
Debug: Tried to remove global 7 but it is not registered as an output: NotFound
Debug: Tried to remove global 8 but it is not registered as an output: NotFound
Debug: Tried to remove global 9 but it is not registered as an output: NotFound
Debug: Tried to remove global a but it is not registered as an output: NotFound
Debug: Tried to remove global 1c but it is not registered as an output: NotFound
Debug: Tried to remove global b but it is not registered as an output: NotFound
Debug: Tried to remove global f but it is not registered as an output: NotFound
Debug: Tried to remove global d but it is not registered as an output: NotFound
Debug: Tried to remove global 1a but it is not registered as an output: NotFound
Debug: Tried to remove global 11 but it is not registered as an output: NotFound
Debug: Tried to remove global c but it is not registered as an output: NotFound
Debug: Tried to remove global 10 but it is not registered as an output: NotFound
Debug: Tried to remove global e but it is not registered as an output: NotFound
Debug: Tried to remove global 1e but it is not registered as an output: NotFound
Debug: Tried to remove global 1d but it is not registered as an output: NotFound
Debug: Tried to remove global 4 but it is not registered as an output: NotFound
Debug: Tried to remove global 3 but it is not registered as an output: NotFound
Debug: Tried to remove global 2 but it is not registered as an output: NotFound
Debug: Tried to remove global 1 but it is not registered as an output: NotFound
Gdk-Message: 10:37:13.937: Error reading events from display: Broken pipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triaged Triage into JIRA to plan it in
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants