Commit Graph

75495 Commits

Author SHA1 Message Date
Matthias Clasen
370b1fe3d5 Post release version bump 2023-08-05 06:02:25 -04:00
Matthias Clasen
f5516845d4 4.10.5 2023-08-05 05:50:38 -04:00
Benjamin Otte
bfb069ea5a Merge branch 'cherry-pick-f0f7613a' into 'gtk-4-10'
Merge branch 'zbrown/pending' into 'main'

See merge request GNOME/gtk!6214
2023-07-26 05:33:04 +00:00
Benjamin Otte
3c1a300e17 Merge branch 'zbrown/pending' into 'main'
filterlistmodel: emit ::notify::pending after ::items-changed

See merge request GNOME/gtk!6213

(cherry picked from commit f0f7613adb)

72a1bd64 filterlistmodel: emit ::notify::pending after ::items-changed
2023-07-26 00:52:02 -04:00
Balázs Meskó
7a3a82749b Update Hungarian translation 2023-07-25 23:43:05 +00:00
Ngọc Quân Trần
e944cd8916 Update Vietnamese translation 2023-07-22 08:16:20 +00:00
Efstathios Iosifidis
9d633773b0 Update Greek translation 2023-07-21 22:29:43 +00:00
Daniel Mustieles
9ccff25c15 Update Spanish translation 2023-07-19 12:36:24 +00:00
Daniel Mustieles
384deb5da7 Revert "Updated Spanish translation"
This reverts commit f0c27b7c8e.
2023-07-19 14:34:43 +02:00
Daniel Mustieles
f0c27b7c8e Updated Spanish translation 2023-07-19 14:24:40 +02:00
Leônidas Araújo
98a2aae5ac Update Brazilian Portuguese translation 2023-06-26 13:08:44 +00:00
Carlos Garnacho
fa1c48adda Merge branch 'wip/carlosg/clear-resize-cursor-4-10' into 'gtk-4-10'
window: Clear resize_cursor on leave notify events (4.10)

See merge request GNOME/gtk!6143
2023-06-25 19:04:58 +00:00
Michel Dänzer
8362e18891 window: Clear resize_cursor on leave notify events
When the pointer leaves the window surface, gtk_window_capture_motion
will not be called anymore, so priv->resize_cursor may remain non-NULL
indefinitely without this.

If update_cursor is later called (via gtk_window_maybe_update_cursor) on
a virtual enter notify event (e.g. because the pointer entered a
descendant surface), it would previously re-set the window surface
cursor to priv->resize_cursor, which could result in the wrong cursor
shape being shown for descendant surfaces.

This affected mutter-x11-frames, see
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1557.

One could also say that if the pointer leaves the window surface, it's
trivially not over any window edge.

(cherry-picked from commit f8fd04402e)
2023-06-25 20:40:34 +02:00
Benjamin Otte
08d4d63446 Merge branch 'unaligned-access-for-gtk-4-10' into 'gtk-4-10'
gtk: Align key_size up to key_align (for gtk-4-10)

See merge request GNOME/gtk!6124
2023-06-20 16:06:09 +00:00
Matt Turner
a358203157 gtk: Align key_size up to key_align
Avoids unaligned accesses when e.g. the key_size is 12 and key_align is
8. We need to round the key size up to 16 to ensure that all keys are
appropriately aligned.

This manifested as a failure in the `gtk:gtk / sorter` unit test on
sparc.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5907
(cherry picked from commit 3f360aa883)
2023-06-19 21:42:19 -04:00
Matt Turner
00cdaba5a8 gtk: Pass G_ALIGNOF (...) to gtk_sort_keys_new
The sizeof and G_ALIGNOF are often, but not always, identical.

(cherry picked from commit a444045386)
2023-06-19 21:23:41 -04:00
Matthias Clasen
63bd793004 Merge branch 'forgotten-410-backport' into 'gtk-4-10'
Revert "css: Simplify default values"

See merge request GNOME/gtk!6092
2023-06-13 14:41:10 +00:00
Matthias Clasen
97e6c7228a Revert "css: Simplify default values"
This reverts commit 1efa39672b.

We want to use corner values for corner properties.

Fixes: #5892
2023-06-13 09:10:30 -04:00
Daniel Rusek
9ffbeb2f21 Update Czech translation 2023-06-12 13:14:40 +00:00
Matthias Clasen
ce86609f42 Post-release version bump 2023-06-05 11:38:52 -04:00
Matthias Clasen
55bc7808cc 4.10.4 2023-06-05 11:27:22 -04:00
Matthias Clasen
b77a5fedd2 Merge branch 'gtk-4-10-backports' into 'gtk-4-10'
tests: Stop copying the tool tests

See merge request GNOME/gtk!6062
2023-06-05 12:35:40 +00:00
Benjamin Otte
afea4a8da5 stringsorter: Handle NULL strings
NULL is a valid string GValue, so we need to handle it.
The utf8 normalizing and collating functions do not, so we better catch
it early.
2023-06-05 08:12:54 -04:00
Matthias Clasen
03df96bace searchentry: Improve size allocation
We want to always reserve space for the clear icon,
but let the text widget use that space when the icon
isn't shown. A plain box layout can't do that, so
do our own size allocation.
2023-06-05 08:12:54 -04:00
Matthias Clasen
e16f71304f text: Make the placeholder non-intrusive
We never want to let the placeholder cause
the widget to grow, so set its max-width-chars
to a small value to make it ellipsize.
2023-06-05 08:06:46 -04:00
Benjamin Otte
18482ac484 renderer: return_if_fail() if the given texture size is 0
All renderers SEGV currently when that happens.
2023-06-05 08:06:13 -04:00
Matthias Clasen
c9d6074198 wayland: Don't leak cursor structs
Found by gcc's -fanalyzer.
2023-06-05 08:05:57 -04:00
Matthias Clasen
f647d7e687 Revert "gdk/x11: Also grab keyboard during XDnD grabs"
This reverts commit ae94417f80.
2023-06-05 08:05:41 -04:00
Matthias Clasen
2f6d374fe2 x11: Stop using passive grabs
The keynav that this implements is half-broken under
xwayland anyway, and it confused and complicates things
on the compositor side.
2023-06-05 08:05:33 -04:00
Marco Trevisan (Treviño)
bd906560dd x11: Trap XRandr errors when getting outputs during init and update
We may try to update the XRR outputs and Crtcs when they're changing in
the server, and so we may get BadRROutput that we're currently not
handling properly.

As per this, use traps and check whether we got errors, and if we did
let's ignore the current output.

It's not required to call init_randr13() again because if we got errors
it's very likely that there's a change coming that will be notified at
next iteration during which we'll repeat the init actions.
2023-06-05 08:05:01 -04:00
Daniel Boles
e86d18d77c Window: Copy caveats from :*visible to the setters 2023-06-05 08:04:50 -04:00
Daniel Boles
c709a8d668 Window: Fix wrong case in property attribute which
rendered the literal text `org.gtk.MEthod.set_property	focus-visible`.
2023-06-05 08:04:42 -04:00
Erik Schilling
ecfb2b8cdf label: Fix crashes when executing a11y actions 2023-06-05 08:03:55 -04:00
Alice Mikhaylenko
dfc66ffd93 actionmuxer: Correctly notify actions after reparenting
When registering an observer, we send a notification and for that we need
to query the action's state and param type. When setting up a muxer parent,
same thing happens, except the action is queried on the parent instead.

This means that the muxer will notify observers about the parent's actions,
but not about its own.

Add a test to verify it works.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5861
2023-06-05 08:02:33 -04:00
Marco Trevisan (Treviño)
7513fd5d64 gdkselectioninputstream-x11: Explicitly handle stream ownership in signal
The display xevent signal connection takes the ownership of the stream
until we get a valid event, so it should manage the stream lifetime.

So make this clearer, by automatically removing the stream reference
when we disconnect from the xevent signal handler.
2023-06-05 08:01:55 -04:00
Marco Trevisan (Treviño)
6c9a1c51ba gdkselectioninputstream-x11: Make it clearer how we manage the stream ownership
It gets unreffed during gdk_x11_selection_input_stream_complete, so use
APIs that make this clearer.
2023-06-05 08:01:49 -04:00
Marco Trevisan (Treviño)
8de231131c gtkselectioninputstream-x11: Do not add an extra reference to the returned stream
We create a new stream during gdk_x11_selection_input_stream_new_async()
then such stream is referenced when passed to the task via
g_task_return_pointer(), so there's no need to reference it again before
returning it, or we'd end up leaking.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4892
2023-06-05 08:01:40 -04:00
Marco Trevisan (Treviño)
25f8793a35 gtkselectioninputstream-x11: Do not add unreffed bytes to the chunks queue
This should never happen, but we may exit the loop because of count value
with an unreffed bytes pointer being added back to the chunks queue.
2023-06-05 08:01:30 -04:00
Marco Trevisan (Treviño)
f02b739f4c gtkselectioninputstream-x11: Do not add EOF marker twice to the chunks queue
We were adding the same EOF marker two times back to the chunks queue,
one implicitly, and the other time could happen when exiting the loop.
2023-06-05 08:01:22 -04:00
Luca Bacci
a55b84f524 Check for NULL groups in gtk_action_muxer_get_group ()
The groups hash table is initialized lazily when inserting
the first GActionGroup (gtk_action_muxer_insert ()). Do as
all surrounding code does and check for NULL before using
groups.

This avoids triggering a warning
2023-06-05 08:00:43 -04:00
Daniel Boles
ba69a30d27 MenuButton: Always mention child@always-show-arrow
get_always_show_arrow() did not mention at all that the custom child is
relevant. set_always_show_arrow() only did in the blurb, not for the arg
2023-06-05 07:59:47 -04:00
FineFindus
5abff9e22a docs: add HSL to Gdk.RGBA.parse
Update the Gdk.RGBA.parse docs to reflect the ability to parse HSL, which has been added in 4.5.0.
2023-06-05 07:58:47 -04:00
Jason Francis
6a172090aa win32: Invalidate inactive monitors
Without this, there are still GdkMonitors present for displays that are
present but disconnected (such as when a laptop disables the internal
display to connect to an external monitor).
2023-06-05 07:58:25 -04:00
Benjamin Otte
36b4903e0c glx: Implement support for EXT_swap_control
XWayland (at least on gnome-shell) does not support SGI_swap_control,
which we were using to unset the swap interval.

It does support EXT_swap_control though, which is the more modern
version of the same thing, so this commit adds support for that.

And now GDK_DEBUG=no-vsync gives me >1000fps instead of just 60fps,
2023-06-05 07:58:12 -04:00
José Expósito
2092d21bad gtkeventcontrollerscroll: Send lores scroll in the middle of the detent
Some mice send a value slightly lower than 120 for some detents. The
current approach waits until a value of 120 is reached before sending a
low-resolution scroll event.

For example, the MX Master 3 sends a value of 112 in some detents:

              detent                   detent
    |                        |                       |
                        ^    ^                    ^
                        112  REL_WHEEL            224

As illustrated, only one event was sent but two were expected. However,
sending the low-resolution scroll event in the middle plus the existing
heuristics to reset the accumulator solve this issue:

              detent                   detent
    |                        |                       |
                ^          ^             ^          ^
                REL_WHEEL  112           REL_WHEEL  224

Send low-resolution scroll events in the middle of the detent to solve
this problem.

Related to https://gitlab.gnome.org/GNOME/mutter/-/issues/2469
2023-06-05 07:57:52 -04:00
Daniel Boles
23c044d060 MenuButton: Fix small grammar-o/match related syms 2023-06-05 07:57:33 -04:00
Matthias Clasen
9de18be775 menus: Avoid unnecessary right padding
We are using placeholders in the 'check' column
that are put in a size group, so that they all
take the same space once a check or radio is shown.

Unfortunately, for the inline-buttons option, we
were using a GtkBuiltinIcon as placeholder, and those
respect the -gtk-icon-size CSS property and take
a minimum size of 16px. Use a GtkGizmo instead to
get the expected result of no extra padding unless
there's a check or radio.

Fixes: #5839
2023-06-05 07:57:21 -04:00
Khalid Abu Shawarib
10c62d9e72 gtk/recentmanager: Fix date leak 2023-06-05 07:57:07 -04:00
Arjan Molenaar
dc82959ac1 Fix typo in CSS docs 2023-06-05 07:56:40 -04:00
Calvin Walton
e435d8b93c filelauncher: Use ShowItems to show in File Manager
The non-portal fallback method for launching a file manager to show the
file in its parent directory was incorrectly using the `ShowFolders`
method (open a folder) instead of `ShowItems` (open the parent directory
and show the file).

The `show_item` function (previously `show_folder`) had an unused
`callback` parameter; it has been removed and the type of the parameter
containing the GTask has been renamed and now uses the correct type
instead of gpointer to reduce the amount of casting required.

Fixes GNOME/gtk#5842
2023-06-05 07:56:23 -04:00