1. 08 Feb, 2019 1 commit
    • Carlos Garnacho's avatar
      imwayland: Toggle OSK more sparingly · 38a4c4dd
      Carlos Garnacho authored
      Specifically it is avoided to be toggled if:
      - Just received focus (in order to preserve OSK state across focus changes)
      - Moving cursor around. Still allow some jitter as perfect accuracy is not
        possible.
      
      Closes: #1277
      38a4c4dd
  2. 05 Feb, 2019 1 commit
    • Emmanuele Bassi's avatar
      Terminate strncpy() buffers correctly · 8f8b68f8
      Emmanuele Bassi authored
      When using strncpy() with a buffer we need to account for the
      terminating NUL character. GCC 8 started warning when using PPD_MAX_NAME
      as the buffer length for strncpy() because the buffer we're copying into
      has the same length — which means that the terminating NUL may be
      skipped if the source string has a length of PPD_MAX_NAME.
      
      The appropriate way to handle the case where we're copying a source with
      a length bigger than of PPD_MAX_NAME is, as reported in the strncpy()
      documentation, to copy `PPD_MAX_NAME - 1` bytes, and explicitly NUL
      terminate the destination buffer. This has the additional benefit of
      avoiding the compiler warning.
      8f8b68f8
  3. 24 Jan, 2019 1 commit
  4. 23 Jan, 2019 1 commit
  5. 21 Jan, 2019 1 commit
  6. 14 Jan, 2019 1 commit
    • John Ralls's avatar
      [IMQuartz] Get the GdkWindow from the NSKeyEvent. · ee0e59e6
      John Ralls authored
      Instead of from the IMContextQuartz's client window because the former
      is the event window where the text will be inserted. In some cases
      they're different and the text may be discarded (because the client
      window isn't editable) or misplaced.
      
      Fixes Bug 707945.
      ee0e59e6
  7. 06 Dec, 2018 1 commit
  8. 30 Oct, 2018 1 commit
    • Carlos Garnacho's avatar
      imwayland: Plug leaks · 336f3827
      Carlos Garnacho authored
      The various strings (pending/current preedit, surrounding, and commit
      buffer) are being leaked in the case of GtkIMContext destruction.
      336f3827
  9. 17 Oct, 2018 1 commit
  10. 16 Oct, 2018 2 commits
  11. 08 Oct, 2018 1 commit
    • Chun-wei Fan's avatar
      gtkimcontextime.c: Fix Korean input · 1ece5562
      Chun-wei Fan authored
      Commit c255ba68 inadvertently introduced a regression that broke Korean
      text input because the changes there resulted that only the last input
      string that we have from ImmGetCompositionStringW() for each time the
      commit signal is emitted is kept, and also as a result the final Korean
      character that is input by hitting space is also lost as a result, as we
      didn't check for whether we are done with preediting.
      
      Fix these issues by doing the following when we receive the
      WM_IME_COMPOSITION message with GCS_RESULTSTR from Windows:
      -Do not emit the commit signal during WM_IME_ENDCOMPOSITION, and...
      -Emit the commit signal anyways, as we did before, c255ba68, however...
      -We still save up the string to commit, because we need to re-compute
       the cursor position when we do ->get_preedit_string(), which needs to
       take the GCS_RESULTSTR string we get from WM_IME_COMPOSITION into
       account as well, so that we avoid getting the Pango criticals that
       occur during Chinese (and most likely Japanese) input as the cursor
       position is out-of-range.
      
      Fixes issue #1350.
      1ece5562
  12. 28 Sep, 2018 1 commit
  13. 14 Sep, 2018 1 commit
  14. 11 Sep, 2018 2 commits
  15. 07 Sep, 2018 1 commit
  16. 23 Aug, 2018 1 commit
  17. 30 Jul, 2018 1 commit
  18. 28 Jul, 2018 1 commit
    • Christian Hergert's avatar
      imwayland: fix potential leak of attr list · 508e0648
      Christian Hergert authored
      This fixes a potential leak of a PangoAttrList that is set when chaining
      up to the parent get_preedit_string(). We check to see if the attr list
      was created and reuse it instead of leaking the previous value.
      508e0648
  19. 20 Jul, 2018 1 commit
  20. 24 Jun, 2018 1 commit
    • Michael Catanzaro's avatar
      imwayland: Fix a small leak · efb934c0
      Michael Catanzaro authored
      If the parent get_preedit_string implementation returns a nonnull
      zero-length string, then we ignore it, which is almost fine. We have to
      free it, though.
      
      Fixes #1174
      efb934c0
  21. 22 Jun, 2018 1 commit
  22. 25 Apr, 2018 1 commit
  23. 04 Apr, 2018 1 commit
  24. 28 Mar, 2018 1 commit
  25. 20 Mar, 2018 1 commit
    • Carlos Garnacho's avatar
      imwayland: Avoid TOGGLE_INPUT_PANEL requests if there's no focus · 4f78abdd
      Carlos Garnacho authored
      Fixes two things: 1) As GTK+ can be coerced into using the wayland IM
      module despite the compositor not implementing the interface, all paths
      not checking for global state before sending requests are prone to
      crashes, this one fell hit this pitfall.
      
      And 2) ensures the tap gesture only triggers TOGGLE_INPUT_PANEL if the
      widget IM is focused. This is a possibility on eg. WebKit pages, where
      its IM is only focused as long as a form element in the page is focused.
      Tapping elsewhere shouldn't toggle the OSK.
      
      GNOME/gtk#114
      
      Closes: #114
      4f78abdd
  26. 17 Feb, 2018 1 commit
  27. 14 Feb, 2018 1 commit
    • Carlos Garnacho's avatar
      modules: Add wayland IM implementation · e8bffe0c
      Carlos Garnacho authored
      This IM context implementation goes through the gtk-text-input protocol,
      leaving up to the compositor the actual interaction with IM engines. If
      the protocol is not offered by the compositor, GTK+ will fallback to the
      IMs as specified through GtkSettings.
      e8bffe0c
  28. 17 Dec, 2017 1 commit
  29. 30 Oct, 2017 1 commit
    • Chun-wei Fan's avatar
      input/IME: Defer the emit of the "commit" signal · c255ba68
      Chun-wei Fan authored
      On Windows, when IME is used, each keystroke results in the
      WM_IME_COMPOSITION event being sent first.  This means that in our case
      when one decides on to accept the input that is in the preedit buffer,
      we first get from Windows the WM_IME_COMPOSITION event
      (where we emit the commit signal), followed by the WM_IME_ENDCOMPOSITION
      event (where we emit the pair of preedit-changed and preedit-end
      signals).
      
      Since commit f11f989f (GtkEntry: Remove recompute idle), we do the input
      recomputation directly, this will cause a pair of "Pango-WARNING:
      Assertion failed: (index >= 0 && index <= layout->length)" being shown,
      as gtkentry.c's priv->preedit_length and priv->preedit_cursor was unable
      to be reset to 0 in time as a result of the recomputation triggered by
      the commit being done before the reset of priv->preedit_length and
      priv->preedit_cursor (which are no longer valid as we essentially say
      that we are done with the preedit buffer).
      
      As we could only acquire the final string that was entered in this
      preedit session when we handle the WM_IME_COMPOSITION event, fix this by
      saving up the final string we acquire from Windows IME in UTF-8 when we
      handle the WM_IME_COMPOSITION event from Windows, and emit the commit
      signal with that string after we emit the preedit-changed and
      preedit-end signals when we handle the WM_IME_ENDCOMPOSITION event from
      Windows, which comes afterwards.
      
      Also fix the formatting of the code around the parts of the files that
      was changed.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=787142
      c255ba68
  30. 09 Oct, 2017 1 commit
  31. 08 Aug, 2017 1 commit
  32. 26 Mar, 2017 1 commit
  33. 10 Nov, 2016 1 commit
    • Carlos Garcia Campos's avatar
      printing: Do not truncate job names in GtkPrintOperation · 25522558
      Carlos Garcia Campos authored
      We are currently truncating job names to 255 bytes, because that's the
      maximum allowed length of job-name attribute in CUPS. This is a CUPS
      limitation that GtkPrintOperation shouldn't need to know, and it
      shouldn't affect other backends, that might have other limitations or
      even no limitation at all. This has another side effect, that what you
      set as GtkPrintOperation:job-name could be different to what you get if
      the property is truncated, this is not documented in
      gtk_print_operation_set_job_name(). So, I think the job name should be
      truncated by the CUPS backend, right before setting the job-name
      attribute.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=774097
      25522558
  34. 20 Oct, 2016 1 commit
  35. 16 May, 2016 1 commit
  36. 19 Apr, 2016 2 commits
  37. 16 Apr, 2016 1 commit
    • Bastien Nocera's avatar
      cups: Fix gettext usage · 97d27ca2
      Bastien Nocera authored
      The previous patches didn't mark some strings as to be translated, and
      tried to translate strings with a variable part already inside the
      string, which isn't going to work.
      
      Mark the strings as translatable with context, and also make sure to
      translate static strings when getting them out of their structure.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=764585
      97d27ca2