1. 02 Oct, 2022 1 commit
  2. 01 Oct, 2022 1 commit
  3. 30 Sep, 2022 2 commits
  4. 29 Sep, 2022 4 commits
  5. 28 Sep, 2022 11 commits
    • Carlos Garnacho's avatar
      gdk/wayland: Drop surface checks on wl_pointer.leave handling · 5db8a550
      Carlos Garnacho authored and Mat's avatar Mat committed
      Even though the argument is non-nullable, GTK sometimes incurs in that
      by itself by destroying the surface while the event is in flight. This
      is the case of popping down a GtkDropdown. When this happens we simply
      ignore the crossing event, but we should let it through instead, the
      compositor did not send it in vain and we possibly still have pointer
      state to undo.
      
      Drop the surface checks, so that the event is propagated along GTK.
      5db8a550
    • Carlos Garnacho's avatar
      gtkimcontextwayland: Shuffle full resets after IM changes · 06afb5d3
      Carlos Garnacho authored and Mat's avatar Mat committed
      Doing reset() on the text widgets after commit and delete_surrounding
      is still too eager for some IMs (e.g. those that expect being able
      to commit text while keeping a preedit buffer shown).
      
      However, reset() is more of a "synchronize state" action on Wayland,
      and it is still desirable to do that after changes that do come from
      the IM (e.g. requesting the new surrounding text and cursor/anchor
      positions). Notably here, the text_input protocol may still come up
      with a preedit string after this state synchronization happens.
      
      Shuffle the code so that the text widgets do not reset() the IM
      context after text is deleted or committed, but the Wayland IM does
      apply its practical effects after these actions happen. This keeps
      the Wayland IM fully up-to-date wrt text widget state, while not
      altering the ::commit and ::delete-surrounding-text behavior for
      other IM context implementations.
      
      Closes: #5200
      Fixes: 5b78fe27 (gtktextview: Also reset IM context after IM...)
      Fixes: 7c0a395f (gtktext: Also reset IM context after IM...)
      Fixes: 52ac71b9 (gtktextview: Shuffle the places doing IM reset)
      Fixes: 9e29739e (gtktext: Shuffle the places doing IM reset)
      06afb5d3
    • Simon McVittie's avatar
      gdkevents: Don't ignore modifiers that are not currently active · 42a309f1
      Simon McVittie authored and Mat's avatar Mat committed
      The X11 backend can mark modifiers like Shift as consumed even if they
      aren't actually active, which seems to be something to do with making
      shortcuts like `<Control><Shift>plus` and `<Control>plus` work as
      intended regardless of whether the plus symbol is obtained by pressing
      Shift and a key (like `+/=` on American, British or French keyboards)
      or not (like `*/+` on German keyboards).
      
      However, this can go badly wrong when the modifier is *not* pressed.
      For example, terminals normally have separate bindings for `<Control>c`
      (send SIGINT) and `<Control><Shift>c` (copy). If we disregard the
      consumed modifiers completely, when the X11 backend marks Shift as
      consumed, pressing Ctrl+c would send SIGINT *and* copy to the clipboard,
      which is not what was intended.
      
      By masking out the members of `consumed` that are not in `state`, we
      get the same interpretation for X11 and Wayland, and ensure that
      keyboard shortcuts that explicitly mention Shift can only be triggered
      while holding Shift. It continues to be possible to trigger keyboard
      shortcuts that do not explicitly mention Shift (such as `<Control>plus`)
      while holding Shift, if the backend reports Shift as having been
      consumed in order to generate the plus keysym.
      
      Resolves: #5095
      Bug-Debian: https://bugs.debian.org/1016927
      
      
      Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@debian.org>
      42a309f1
    • Matthias Clasen's avatar
      portal: Use the right mimetype for file transfers · e92e4c57
      Matthias Clasen authored and Mat's avatar Mat committed
      The filetransfer protocol says to use
      application/vnd.portal.filetransfer, but I used
      application/vnd.portal.files when I implemented the
      protocol. Oops.
      
      This commit dds the correct mimetype, but we still
      support the old one to preserve interoperatibility
      with existing flatpaks using GTK 4.6.
      
      Fixes: #5182
      e92e4c57
    • Corey Berla's avatar
      gridview: Fix rubberbanding from negative x coordinates · 8d771eb2
      Corey Berla authored and Mat's avatar Mat committed
      This is a follow-up to 1e9a36ff. For GridView
      we also need to make sure that we aren't rubberbanding below x=0 which
      causes unexpected rubberbanding behavior.
      
      Fixes: nautilus#2492
      8d771eb2
    • Matthias Clasen's avatar
      filechooser: Restore ~ and . functionality · 7aab4ace
      Matthias Clasen authored and Mat's avatar Mat committed
      We'll have to keep patching up these things
      until somebody rewrites the file chooser :(
      
      Inspired by: !4970
      7aab4ace
    • Matthias Clasen's avatar
      Handle absence of portals · 23d8b606
      Matthias Clasen authored and Mat's avatar Mat committed
      When the documents portal is not on the bus,
      we still get an (unowned) proxy, and we need
      to handle that situation.
      23d8b606
    • Matthias Clasen's avatar
      portals: Fix FileTransfer portal calls · af831e48
      Matthias Clasen authored and Mat's avatar Mat committed
      We were not passing the right arguments to
      the AddFiles call, causing the file transfer
      to fail.
      af831e48
    • Matthias Clasen's avatar
      Make the file transfer portal setup sync again · 11e90e4f
      Matthias Clasen authored and Mat's avatar Mat committed
      We need to register the portal mime types before
      the others to prefer them, doing this call async
      messes up that ordering.
      
      This is effectively reverting 69fb3648
      11e90e4f
    • Matthias Clasen's avatar
      Stop recursion in registering serializers · 0b200e39
      Matthias Clasen authored and Mat's avatar Mat committed
      This was probably unintentional, and messes up
      the ordering of our registration.
      0b200e39
    • Hugo Carvalho's avatar
      Update Portuguese translation · a18f52b7
      Hugo Carvalho authored and Administrator's avatar Administrator committed
      a18f52b7
  6. 27 Sep, 2022 3 commits
  7. 26 Sep, 2022 5 commits
  8. 23 Sep, 2022 1 commit
  9. 18 Sep, 2022 3 commits
  10. 12 Sep, 2022 9 commits
    • Matthias Clasen's avatar
      Merge branch 'cherry-pick-4.6' into 'gtk-4-6' · 5fe9faf2
      Matthias Clasen authored
      Cherry-pick changes from main for gtk-4-6
      
      See merge request !5025
      5fe9faf2
    • Matthias Clasen's avatar
      emojichooser: Fix arrow keynav · 7b15c68c
      Matthias Clasen authored and Mat's avatar Mat committed
      When some of the Emoji have been filtered out by
      a search term, arrow keynav would behave oddly and
      get stuck in invisible sections. Fix this by ignoring
      any filtered out children when moving between
      sections for arrow keynav.
      
      Fixes: #5076
      7b15c68c
    • Matthias Clasen's avatar
      Add a test for treelistmodel row collapse · 75fed298
      Matthias Clasen authored and Mat's avatar Mat committed
      Test that we can expand and collapse a row, and then
      add another child below it, without crashing.
      
      Adapted from the testcase in #4595.
      
      This tests the fix in the previous commit.
      75fed298
    • Matthias Clasen's avatar
      treelistmodel: Fix handling of collapsed nodes · d21112a3
      Matthias Clasen authored and Mat's avatar Mat committed
      When we collapse a node, we clear out the children,
      but we were not disconnecting the signal handler on
      the child listmodel, leading to bad outcomes when
      that model is persistent and changing.
      
      Fixes: #4595
      d21112a3
    • Carlos Garnacho's avatar
      gtkwindow: Use pointer-oriented function to deal with crossing events · 083d023b
      Carlos Garnacho authored and Mat's avatar Mat committed
      Commit adba0b97 fixed missed pointer crossings by using a helper function that
      was already present and looked like did everything that was needed. However
      this function was oriented to keyboard focus and it also did update the related
      widget state. Doing these changes on pointer-based crossing was misuse, and
      could cause weird interactions with keyboard focus management.
      
      Fix this by using gtkmain.c gtk_synthesize_crossing_event() that is in fact
      oriented to pointers.
      
      Fixes: adba0b97 (gtkwindow: Synthesize pointer crossing events on state changes)
      Closes: #5094
      083d023b
    • Georges Basile Stavracas Neto's avatar
      paned: Warn if child is not actually a child · 89fc4efe
      Georges Basile Stavracas Neto authored and Mat's avatar Mat committed
      This will at least allow us to debug this in the future.
      89fc4efe
    • Georges Basile Stavracas Neto's avatar
      paned: Protect against NULL variable · 7604eb1e
      Georges Basile Stavracas Neto authored and Mat's avatar Mat committed
      The inner loop in gtk_paned_set_focus_child() tries to find the
      topmost GtkPaned, however, if the `w` variable ends up becoming
      NULL after bubbling up the entire GtkWidget hierarchy, this loop
      never breaks.
      
      Check for NULL in this loop.
      
      Closes #5094
      7604eb1e
    • Carlos Garnacho's avatar
      gtkmain: Pass coordinates when synthesizing pointer events · fda50855
      Carlos Garnacho authored and Mat's avatar Mat committed
      Instead of passing an event and figuring out coordinates from it, pass
      directly the toplevel coordinates so that we can use this outside event
      handling.
      
      All callers have been updated to pass the coordinates, in practical effects
      they were already based on the GtkNative.
      fda50855
    • Carlos Garnacho's avatar
      gtkwindow: Synthesize pointer crossing events on state changes · dd82df9e
      Carlos Garnacho authored and Mat's avatar Mat committed
      When widgets go mapped/unmapped, we repick but don't generate crossing
      events. Since there could be stateful controllers that use those in
      the previously picked widget (e.g. GtkEventControllerMotion), skipping
      those breaks their state.
      
      Ensure to send the relevant crossing events on every situation that
      changes the pointer focus, so these controllers get a fair opportunity
      to undo their state.
      
      Closes: #2877
      dd82df9e