Commit Graph

72731 Commits

Author SHA1 Message Date
Piotr Drąg
dcbba58487 Update Polish translation 2022-09-26 17:59:35 +02:00
Anders Jonsson
e0c3d09e50 Update Swedish translation 2022-09-26 15:59:15 +00:00
Yuri Chornoivan
cf11438f2f Update Ukrainian translation 2022-09-26 15:54:28 +00:00
Matthias Clasen
64891e11d4 Merge branch 'backport-4577' into 'gtk-4-6'
Make the presentation of the stack sidebar listbox nicer for A11Y

See merge request GNOME/gtk!5056
2022-09-26 15:50:34 +00:00
Lukáš Tyrychtr
447d79d908 Make the presentation of the stack sidebar listbox nicer for A11Y
This backports the fix for #4577.
2022-09-26 17:32:13 +02:00
Marek Černocký
d7dbefa664 Updated Czech translation 2022-09-23 16:22:15 +02:00
Christian Kirbach
3d4685fca3 Update German translation 2022-09-18 12:28:27 +00:00
Martin
ff83daa700 Update Slovenian translation 2022-09-18 11:08:34 +00:00
Emin Tufan Çetin
0ed327ba0e Update Turkish translation 2022-09-18 08:23:28 +00:00
Matthias Clasen
5fe9faf2e3 Merge branch 'cherry-pick-4.6' into 'gtk-4-6'
Cherry-pick changes from main for gtk-4-6

See merge request GNOME/gtk!5025
2022-09-12 23:33:54 +00:00
Matthias Clasen
7b15c68cd0 emojichooser: Fix arrow keynav
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
2022-09-12 23:00:00 +03:00
Matthias Clasen
75fed298b8 Add a test for treelistmodel row collapse
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.
2022-09-12 22:58:11 +03:00
Matthias Clasen
d21112a3ce treelistmodel: Fix handling of collapsed nodes
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
2022-09-12 22:57:53 +03:00
Carlos Garnacho
083d023b6b gtkwindow: Use pointer-oriented function to deal with crossing events
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: https://gitlab.gnome.org/GNOME/gtk/-/issues/5094
2022-09-12 22:49:57 +03:00
Georges Basile Stavracas Neto
89fc4efe6f paned: Warn if child is not actually a child
This will at least allow us to debug this in the future.
2022-09-12 22:49:13 +03:00
Georges Basile Stavracas Neto
7604eb1e39 paned: Protect against NULL variable
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 https://gitlab.gnome.org/GNOME/gtk/-/issues/5094
2022-09-12 22:48:50 +03:00
Carlos Garnacho
fda50855c6 gtkmain: Pass coordinates when synthesizing pointer events
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.
2022-09-12 22:48:38 +03:00
Carlos Garnacho
dd82df9e32 gtkwindow: Synthesize pointer crossing events on state changes
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: https://gitlab.gnome.org/GNOME/gtk/-/issues/2877
2022-09-12 22:47:46 +03:00
Carlos Garnacho
1a459c5dcd gtktextview: Also reset IM context after IM surrounding text deletion
When the IM commands the GtkText to delete text, the cursor position
would change, and so would the surrounding text. Reset the IM context
so that these updates are properly picked up by the IM.

Fixes backspace	key behavior in	the GNOME Shell OSK, since that	relies
on the surrounding text	being properly updated for the next iteration.
2022-09-12 22:42:15 +03:00
Carlos Garnacho
735f803c2f gtktext: Also reset IM context after IM surrounding text deletion
When the IM commands the GtkText to delete text, the cursor position
would change, and so would the surrounding text. Reset the IM context
so that these updates are properly picked up by the IM.

Fixes backspace key behavior in the GNOME Shell OSK, since that relies
on the surrounding text being properly updated for the next iteration.
2022-09-12 22:42:01 +03:00
Carlos Garnacho
452d93c7ea gtktext: Avoid early IM reset on updates
Resetting the IM on IM updates is too eager and indeed the simple
IM context doesn't like that this happens in the middle of dead
key handling.

We however want to reset the IM after actual text buffer changes
(say, a committed string) moved the cursor position, altered the
surrounding text, etc. So that the IM implementation does know to
update its state.

Since there is going to be an actual IM reset anyways, it does
no longer make sense to try to preserve the old priv->need_im_reset
status during commit handling.

Fixes: 52ac71b972 ("gtktextview: Shuffle the places doing IM reset")
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5133
2022-09-12 22:41:45 +03:00
Carlos Garnacho
c4f5358826 gtktext: Avoid early IM reset on updates
Resetting the IM on IM updates is too eager and indeed the simple
IM context doesn't like that this happens in the middle of dead
key handling.

We however want to reset the IM after actual text buffer changes
(say, a committed string) moved the cursor position, altered the
surrounding text, etc. So that the IM implementation does know to
update its state.

Fixes: 9e29739e66 ("gtktext: Shuffle the places doing IM reset")
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5133
2022-09-12 22:41:27 +03:00
Matthias Clasen
d3e181f7de Make gtk_launch_uri more robust
We were failing to launch the uri if we are on
Wayland, but have no xdg_foreign protocol support.

Fixes: #5152
2022-09-12 22:38:15 +03:00
Mat
cde32368f0 treepopover: Do not propagate natural width of content
Propagating the natural width of the tree popover contents breaks ellipsizing of items
(see 'Unconstrained menu' in tests/testcombo).
2022-09-12 22:37:18 +03:00
Matthias Clasen
da82eb8e1c Merge branch 'cherry-pick-4.6' into 'gtk-4-6'
Cherry-pick changes from main for gtk-4-6

See merge request GNOME/gtk!5001
2022-09-06 20:13:56 +00:00
Balázs Úr
40e639fb6e Update Hungarian translation 2022-09-02 21:27:19 +00:00
Mat
e3a23a9a9d treeview: Don't claim event sequence too early
We want to claim the event sequence in the click gesture when appropriate,
such as activating a row or clicking an editable cell, but this is currently
done too early, preventing other gestures for drag-and-drop and rubberband
selection entirely.

Fixes #3649
Fixes #3985
Fixes #4669
2022-09-02 17:01:37 +03:00
Matthias Clasen
8558560030 Merge branch 'cherry-pick-4.6' into 'gtk-4-6'
Cherry-pick changes from main for gtk-4-6

See merge request GNOME/gtk!4997
2022-09-01 17:24:15 +00:00
Matej Urbančič
52483b88ce Update Slovenian translation 2022-08-31 18:33:51 +00:00
Mat
2bb0d815ee gtknotebook: update arrow button state when reordering tabs
When reordering notebook tabs, updating the sensitivity state of the
arrow buttons is necessary if the tab is moved to the beginning or
end of the tab list.
2022-08-30 16:55:39 +03:00
Mat
887c743e3d gtknotebook: Claim event sequence after pressing notebook arrow buttons
When notebook tabs are reorderable, pressing the notebook arrow buttons to
change the active tab results in tabs reordering unexpectedly.
Claim the event sequence after pressing an arrow button to avoid conflicts
with the motion/drag gesture used for reordering.
2022-08-30 16:55:27 +03:00
Mat
3e5bbfb2a5 gtkatspiselection: Retrieve the correct GtkNotebook tab widget
A typo resulted in the tab container widget being retrieved instead of
the tab widget. If an adjacent action widget was present, an infinite
loop occurred when switching tabs while a screen reader was enabled.
2022-08-30 16:55:11 +03:00
Mat
2ca86eb969 treeview: Always call grab_focus_without_selecting on search entry
The search text entry is always a GtkText widget, not GtkEntry. If a
custom search entry is set, this part of the code is never reached.

Fixes #4551
2022-08-30 16:54:44 +03:00
Piotr Drąg
393dd5a838 Update Polish translation 2022-08-28 23:33:51 +02:00
Goran Vidović
baba8aa9a5 Update Croatian translation 2022-08-28 14:44:55 +00:00
Sveinn í Felli
a27ae5362c Update Icelandic translation 2022-08-23 11:49:37 +00:00
Sveinn í Felli
e6d3c58ccf Update Icelandic translation 2022-08-23 11:38:38 +00:00
Matthias Clasen
59320f4aa1 Merge branch 'gtk46-backports' into 'gtk-4-6'
text: Respect no-emoji hint fully

See merge request GNOME/gtk!4975
2022-08-22 19:55:43 +00:00
Matthias Clasen
dc397fce3c css: Fix freeing of calc values
We were getting our memory allocations mixed
up here.

Fixes: #5130
2022-08-22 15:38:19 -04:00
Matthias Clasen
317d4c8f8d text: Respect no-emoji hint fully
We were disabling the insert-emoji action when the
no-emoji input hint is set, but the Ctrl-. shortcut
was bypassing the action and kept working. Make
the shortcut activate the action instead.

Fixes: #5123
2022-08-22 15:37:35 -04:00
Carlos Garnacho
8d4968afb2 Merge branch 'wip/carlosg/im-fixes-4-6' into 'gtk-4-6'
gtkimcontextwayland: Refactor handling of client updates [4.6]

See merge request GNOME/gtk!4963
2022-08-18 20:56:33 +00:00
Carlos Garnacho
519258c382 gtkimcontextwayland: Refactor handling of client updates
Currently, the wayland IM context sends zwp_text_input_v3.commit from
a number of places, and some of them with partial data. In order to
make client state updates "atomic" and complete, make the communication
happen over an unified notify_im_change() function that happens on
a narrower set of circumstances:

  - The GtkIMContext is reset
  - The GtkIMContext is just focused
  - The gesture to invoke the OSK is triggered
  - The IM context is reacting to changes coming from the compositor

Notably, setting the cursor location or the surrounding text do not try
to commit state on their own, and now will be flushed with the corresponding
IM update or reset. But also, these requests won't be prevented from
happening individually on serial mismatch, instead it will be the whole
state commit which is held off.

With these changes in place, all client-side updates are notified
atomically to the compositor under a single .commit request.

(cherry-picked from commit f66ffde68d)
2022-08-18 20:03:40 +02:00
Carlos Garnacho
34693b0d9f gtktextview: Shuffle the places doing IM reset
During text widget manipulation (inserting or deleting text via keyboard)
the IM context is reset somewhat early, before the actual change took place.
This makes IM lag behind in terms of surrounding text and cursor position.

Shuffle these IM reset calls so that they happen after the changes, and
ensure that the IM is actually reset, since that is currently toggled on
a pretty narrow set of circumstances.

Also, fix a bug during GtkEventControllerKey::im-update where the condition
on cursor position editability to reset the IM context was inverted.

(cherry-picked from commit 52ac71b972)
2022-08-18 20:03:13 +02:00
Carlos Garnacho
919128d8c2 gtktext: Shuffle the places doing IM reset
During text widget manipulation (inserting or deleting text via keyboard)
the IM context is reset somewhat early, before the actual change took place.
This makes IM lag behind in terms of surrounding text and cursor position.

Shuffle these IM reset calls so that they happen after the changes, and
ensure that the IM is actually reset, since that is currently toggled on
a pretty narrow set of circumstances.

(cherry-picked from commit 9e29739e66)
2022-08-18 20:02:53 +02:00
Zurab Kargareteli
7f26ca0c32 Update Georgian translation 2022-08-18 14:11:38 +00:00
Matthias Clasen
42b14ce5f2 4.6.7 2022-08-17 13:03:24 -04:00
Matthias Clasen
68cff22966 Merge branch 'leak-fixes-46' into 'gtk-4-6'
a11y: Fix a memory leak

See merge request GNOME/gtk!4958
2022-08-17 11:14:48 +00:00
Matthias Clasen
86a137b2ff Merge branch 'cherry-pick-4.6' into 'gtk-4-6'
Cherry-pick changes from main for gtk-4-6

See merge request GNOME/gtk!4959
2022-08-16 21:34:04 +00:00
Mat
65f51d2d16 treeview: Do not set top row adjustment value while animating
gtk_tree_view_top_row_to_dy, which is called from GtkTreeView's
size_allocate function, changes the adjustment value. Since this
conflicts with the animation when changing the active row, bail
out until the animation is finished.

Fixes #4550
2022-08-16 23:29:00 +03:00
Mat
e1dcbd4442 treeview: Use widget coordinates where required
When a GtkTreeView scrolled horizontally, it was not possible to
select rows outside the initial area due to an erroneous comparison
between widget and bin window coordinates.

Original change to widget coordinates occurred in commit
a0de570e47
2022-08-16 23:28:39 +03:00