Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131983

text input v3: first character after refocus doesn't go through the input method

    XMLWordPrintable

Details

    • Linux/Wayland
    • ea32a4946 (dev), 8e8f12679 (6.9), 6a0a78f32 (6.8)

    Description

      • Open an application, focus a text field and enable input method (e.g. ready to input Chinese).
      • Unfocus the application window and refocus it.
      • Start typing.
      • The first key is inputted as is. Others are going through the input method.

      This is caused by the `zwp_text_input_v3.enable()` request is sent but not committed. The following patch fixes it:

      diff --git a/src/client/qwaylandtextinputv3.cpp b/src/client/qwaylandtextinputv3.cpp
      index 75c435a4..c4bfebe3 100644
      --- a/src/client/qwaylandtextinputv3.cpp
      +++ b/src/client/qwaylandtextinputv3.cpp
      @@ -344,8 +344,8 @@ void QWaylandTextInputv3::updateState(Qt::InputMethodQueries queries, uint32_t f
               }
           }
       
      -    if (needsCommit
      -            && (flags == update_state_change || flags == update_state_enter))
      +    if ((needsCommit
      +            && flags == update_state_change) || flags == update_state_enter)
               commit();
       }
       

      Attachments

        For Gerrit Dashboard: QTBUG-131983
        # Subject Branch Project Status CR V

        Activity

          People

            liaqi Liang Qi
            lilydjwg lilydjwg li
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes