1. 28 Nov, 2018 1 commit
    • Samuel Thibault's avatar
      gdk: switch focus to contextual menu · 083cd79a
      Samuel Thibault authored
      in addition to taking a grab, to make sure that it is considered active
      and not other toplevels, notably by the accessibility layer.
      
      01455399 ("gdk: do not deactivate surface on keyboard grabs") disabled
      deactivating surfaces when a grab is ongoing, to avoid noise when using
      desktop keyboard shortcuts. When the application itself is grabbing the
      keyboard from another toplevel, very notably for contextual menus, we
      however do want to deactivate the current surface, so that the grabbing
      toplevel shows up as having the focus.
      
      This also fixes a bug in gdk_x11_surface_focus: when the surface is
      temporary, the window manager does not handle it and will ignore any wm
      hint, so we need to directly use XSetInputFocus.
      
      Fixes #85
      083cd79a
  2. 10 Oct, 2018 2 commits
  3. 09 Oct, 2018 3 commits
    • Chun-wei Fan's avatar
      gtkimcontextime.c: Fix Korean input · 1ca5b415
      Chun-wei Fan authored
      Commit 64a489ad 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.
      1ca5b415
    • Chun-wei Fan's avatar
      testsuite/gtk/filterlistmodel.c: Avoid GCCism · cebf5ed4
      Chun-wei Fan authored
      Pointer arithmetic on gpointers (void *) is a GCCism, so avoid that by
      being more explicit with things.
      cebf5ed4
    • Chun-wei Fan's avatar
      testsuite/gtk/[flatten|sort]listmodel.c: Avoid VLA usage · 1ca90600
      Chun-wei Fan authored
      Visual Studio is unlikely to support VLAs at any point, so avoid using
      them and use g_newa() instead.
      1ca90600
  4. 07 Oct, 2018 6 commits
  5. 06 Oct, 2018 1 commit
    • LRN's avatar
      GDK W32: Support switching IM contexts at runtime · 66c0336e
      LRN authored
      This leverages the normal input context switching mechanism in GTK
      by making it think that the gtk-im-module setting changed.
      The backend returns gtk-im-module value as "ime" if W32
      IME API says that an IME is in use. Otherwise it returns
      and empty string - this still triggers an input context
      switching code, which, not being able to create the desired context
      (which is and empty string), falls back to looking at current
      keyboard layout (currently that code is still a FIXME).
      
      Paired with the code that signals gtk-im-module change on keyboard layout
      switches, this is sufficient to make GTK capable of switching to
      the appropriate IM context at runtime. At least, the kinds of context
      that specify languages for which they are used automatically by default
      (once locale matching is implemented), and the IME context.
      
      Loading other kinds of IM context might still work via specifying
      the gtk-im-module setting in gtk ini file, but doing so will likely
      make GTK incapable of using the IME context that is used
      for Korean, Chinese and Japanese (and some other languages).
      
      Until someone figures out a way to actually change gtk-im-module
      setting on Windows at runtime with meaningful values, the behaviour
      introduced by this commit seems like a sufficient workaround.
      66c0336e
  6. 05 Oct, 2018 3 commits
  7. 04 Oct, 2018 1 commit
  8. 30 Sep, 2018 1 commit
  9. 27 Sep, 2018 2 commits
    • emersion's avatar
      gdk: seal in-memory files when possible · e9a67cc6
      emersion authored
      This can be used by compositors to mmap memory without having to
      handle SIGBUS.
      e9a67cc6
    • Hugo Lefeuvre's avatar
      gtkstack: fix null pointer dereference · 44655932
      Hugo Lefeuvre authored
      The gtk_stack_snapshot_slide() function dereferences the
      last_visible_child pointer without proper != NULL ckeck. This might
      result in NULL pointer dereference and crash if last_visible_child is
      invalid.
      
      Add a != NULL check before dereferencing the pointer.
      44655932
  10. 26 Sep, 2018 3 commits
  11. 25 Sep, 2018 1 commit
  12. 24 Sep, 2018 2 commits
  13. 23 Sep, 2018 7 commits
  14. 22 Sep, 2018 2 commits
  15. 20 Sep, 2018 2 commits
  16. 19 Sep, 2018 3 commits