gtk4.git
2 years agotooltipwindow: Cast the correct object
Benjamin Otte [Sun, 2 Apr 2023 12:06:11 +0000 (14:06 +0200)]
tooltipwindow: Cast the correct object

the tooltipwindow is in the userdata.

2 years agoDocumentation corrections for GtkTextIter
Cam Cook [Sun, 2 Apr 2023 17:12:21 +0000 (13:12 -0400)]
Documentation corrections for GtkTextIter

| method                                                                                                     | current                                                       | suggestion                                                      |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------|
| [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." |
| [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595)                        | "Use [method@Gtk,TextBuffer.get_iter_at_offset]"              | "Use [method@Gtk.TextBuffer.get_iter_at_offset]"                |
| [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201)                       | "returns %TRUE, [method@Gtk.TextIter.has_tag"                 | "returns %TRUE, [method@Gtk.TextIter.has_tag] "                 |

| method                                                                                                 | current                                             | suggestion                                                |
|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------|
| [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715)     | "Like gtk_text_iter_forward_cursor_position()"      | "Like [method@Gtk.TextIter.forward_cursor_position]"      |
| [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483)           | "Same as gtk_text_iter_forward_find_char()"         | "Same as [method@Gtk.TextIter.forward_find_char]"         |
| [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295)              | "Same as gtk_text_iter_forward_search()"            | "Same as [method@Gtk.TextIter.forward_search]"            |
| [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611)     | "Calls gtk_text_iter_backward_sentence_start()"     | "Calls [method@Gtk.TextIter.backward_sentence_start]"     |
| [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter.backward_visible_word_start]" |
| [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345)         | "Calls gtk_text_iter_backward_word_start()"         | "Calls [method@Gtk.TextIter.backward_word_start]"         |
| [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591)        | "Calls gtk_text_iter_forward_sentence_end()"        | "Calls [method@Gtk.TextIter.forward_sentence_end]"        |
| [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131)               | "gtk_text_iter_get_char() called on"                | "[method@Gtk.TextIter.get_char] called on"                |
| [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403)    | "Calls gtk_text_iter_forward_visible_word_end()"    | "Calls [method@Gtk.TextIter.forward_visible_word_end]"    |
| [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327)            | "Calls gtk_text_iter_forward_word_end()"            | " Calls [method@Gtk.TextIter.forward_word_end]"           |
| [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664)                       | "gtk_text_iter_is_end() is the most efficient"      | "[method@Gtk.TextIter.is_end] is the most efficient"    |
| [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900)               | "Same as gtk_text_iter_set_line_offset()"           | "Same as [method@Gtk.TextIter.set_line_offset]"         |
| [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987)       | "Like gtk_text_iter_set_line_index()"               | "Like [method@Gtk.TextIter.set_line_index]"             |
| [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946)      | "Like gtk_text_iter_set_line_offset()"              | "Like [method@Gtk.TextIter.set_line_offset]"            |

2 years agoDocumentation corrections for GtkTextIter
Cam Cook [Sun, 2 Apr 2023 16:51:29 +0000 (12:51 -0400)]
Documentation corrections for GtkTextIter

| method                                                                                                     | current                                                       | suggestion                                                      |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------|
| [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." |
| [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595)                        | "Use [method@Gtk,TextBuffer.get_iter_at_offset]"              | "Use [method@Gtk.TextBuffer.get_iter_at_offset]"                |
| [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201)                       | "returns %TRUE, [method@Gtk.TextIter.has_tag"                 | "returns %TRUE, [method@Gtk.TextIter.has_tag] "                 |

| method                                                                                                 | current                                             | suggestion                                                |
|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------|
| [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715)     | "Like gtk_text_iter_forward_cursor_position()"      | "Like [method@Gtk.TextIter.forward_cursor_position]"      |
| [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483)           | "Same as gtk_text_iter_forward_find_char()"         | "Same as [method@Gtk.TextIter.forward_find_char]"         |
| [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295)              | "Same as gtk_text_iter_forward_search()"            | "Same as [method@Gtk.TextIter.forward_search]"            |
| [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611)     | "Calls gtk_text_iter_backward_sentence_start()"     | "Calls [method@Gtk.TextIter.backward_sentence_start]"     |
| [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter.backward_visible_word_start]" |
| [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345)         | "Calls gtk_text_iter_backward_word_start()"         | "Calls [method@Gtk.TextIter.backward_word_start]"         |
| [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591)        | "Calls gtk_text_iter_forward_sentence_end()"        | "Calls [method@Gtk.TextIter.forward_sentence_end]"        |
| [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131)               | "gtk_text_iter_get_char() called on"                | "[method@Gtk.TextIter.get_char] called on"                |
| [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403)    | "Calls gtk_text_iter_forward_visible_word_end()"    | "Calls [method@Gtk.TextIter.forward_visible_word_end]"    |
| [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327)            | "Calls gtk_text_iter_forward_word_end()"            | " Calls [method@Gtk.TextIter.forward_word_end]"           |
| [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664)                       | "gtk_text_iter_is_end() is the most efficient"      | "[method@Gtk.TextBuffer.is_end] is the most efficient"    |
| [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900)               | "Same as gtk_text_iter_set_line_offset()"           | "Same as [method@Gtk.TextBuffer.set_line_offset]"         |
| [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987)       | "Like gtk_text_iter_set_line_index()"               | "Like [method@Gtk.TextBuffer.set_line_index]"             |
| [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946)      | "Like gtk_text_iter_set_line_offset()"              | "Like [method@Gtk.TextBuffer.set_line_offset]"            |

2 years agoinspector: Update some misc info rows
Matthias Clasen [Sat, 1 Apr 2023 18:18:27 +0000 (14:18 -0400)]
inspector: Update some misc info rows

2 years agogsk/gl/renderjob: Decompose matrix for 3D transforms
Georges Basile Stavracas Neto [Sat, 1 Apr 2023 14:38:22 +0000 (11:38 -0300)]
gsk/gl/renderjob: Decompose matrix for 3D transforms

While this can be more expensive, it's also correct.

2 years agoinspector: Improve display of paths
Matthias Clasen [Sat, 1 Apr 2023 13:45:58 +0000 (09:45 -0400)]
inspector: Improve display of paths

The values in the path section are long and generally
ellipsized. It does not make sense to reserve extra
space that the labels don't need.

2 years agodocs: Improve GtkLabel rendering
Bilal Elmoussaoui [Sat, 1 Apr 2023 12:06:11 +0000 (12:06 +0000)]
docs: Improve GtkLabel rendering

By adding some missing links & avoid the browser
from rendering the entities as their equivalent symbols

2 years agolistitem: Fix a notification problem
Matthias Clasen [Thu, 30 Mar 2023 18:12:54 +0000 (14:12 -0400)]
listitem: Fix a notification problem

We were notifying ::item when ::child is
changed. Oops

2 years agoa11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows
Lukáš Tyrychtr [Tue, 28 Mar 2023 13:07:03 +0000 (15:07 +0200)]
a11y: Set ATSPI_STATE_SHOWING for all widgets, not only for windows

According to the at-spi2 docs, for a widget to be considered visible,
it needs both the showing and visible states. Many applications rely on that,
for example the flat review functionality of Orca.

this fixes #5194

2 years agoRemove wrong annotation for GdkToplevel::compute-size
Emmanuele Bassi [Sun, 26 Mar 2023 14:48:44 +0000 (15:48 +0100)]
Remove wrong annotation for GdkToplevel::compute-size

The size argument is passed to the signal by the GDK surface machinery,
as is: it's not going to be allocated by the caller (since it's a
signal), and it's not an out argument.

2 years agomagnifier: Correct position of area
Matthias Clasen [Fri, 24 Mar 2023 19:30:27 +0000 (15:30 -0400)]
magnifier: Correct position of area

The widget paintable uses the widgets bounds
as intrinsic size, so we need to offset from
that to the allocation, which is what the
coordinates are relative to.

2 years agotexthandle: Correct placement of handles
Matthias Clasen [Fri, 24 Mar 2023 18:49:18 +0000 (14:49 -0400)]
texthandle: Correct placement of handles

Text handles had the same problem as popovers.
They were interpreting their pointing-to rectangle
relative to the widgets bounds, when it is meant
to be relative to the widgtets allocation.

While we touch this code, rewrite it to use
gtk_widget_compute_point.

2 years agopopover: Correct placement of popovers
Matthias Clasen [Fri, 24 Mar 2023 18:47:27 +0000 (14:47 -0400)]
popover: Correct placement of popovers

When we don't have a pointing-to rectangle, we want to place
the popover wrt to the parents bounds. But if we have a
pointing-to rectangle, it is relative to the widgets allocation,
which is different from the bounds.

We were not handling the second case correctly, leading to context
menus in the text view being mispositioned by the widgets CSS padding.

While we are touching this code, rewrite it to handle transforms.

Fixes: #5695
2 years agodocs: Improve markup for keys
Matthias Clasen [Fri, 24 Mar 2023 13:42:25 +0000 (09:42 -0400)]
docs: Improve markup for keys

Consistently use <kbd>x</kbd> to render keys in the docs
and use + for key combinations.

2 years agodocs: Some updates
Matthias Clasen [Fri, 24 Mar 2023 12:56:06 +0000 (08:56 -0400)]
docs: Some updates

Fix some links ot point to docs.gtk.org.

2 years agogtkwidget: Do a type-check in gtk_widget_in_destruction()
Marco Trevisan (Treviño) [Fri, 24 Mar 2023 02:29:53 +0000 (03:29 +0100)]
gtkwidget: Do a type-check in gtk_widget_in_destruction()

Given it can be called during a widget destruction, it's safer to do a
type-check before crashing.

See: https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1727

2 years agofix crash with gtk_accessible_role_to_name and GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON
Caolán McNamara [Tue, 21 Mar 2023 15:04:12 +0000 (15:04 +0000)]
fix crash with gtk_accessible_role_to_name and GTK_ACCESSIBLE_ROLE_TOGGLE_BUTTON

presumably since:

commit de80f503e4db282a7343aa16d2803967d4179739
Date:   Thu Feb 23 14:22:20 2023 +0100

    a11y: Introduce a dedicated role for toggle buttons

2 years agocheckbutton: Only andle arrow focus if we're in a group
Benjamin Otte [Tue, 21 Mar 2023 13:06:33 +0000 (14:06 +0100)]
checkbutton: Only andle arrow focus if we're in a group

If there is no other widget in the group that we can focus, don't focus
and activate ourselves.

Otherwise the arrow keys on checkbuttons toggle the checkbutton.

2 years agotheme: Use 0.5 opacity for disabled pictures
Marco Trevisan (Treviño) [Mon, 20 Mar 2023 22:38:35 +0000 (23:38 +0100)]
theme: Use 0.5 opacity for disabled pictures

If a GtkImage is using an icon we use a gtk-icon-filter to se the icon
opacity when in insensitive state, however when using other kinds of
pictures we do not apply the same style leading to an inconsistent
result.

Closes: #5683
2 years agogsk: Use explicit switches
Matthias Clasen [Wed, 19 Apr 2023 07:19:12 +0000 (09:19 +0200)]
gsk: Use explicit switches

This makes it harder to forget to add new
node types here.

2 years agogsk: Mask nodes support 2d transforms
Matthias Clasen [Wed, 19 Apr 2023 06:13:55 +0000 (08:13 +0200)]
gsk: Mask nodes support 2d transforms

When adding mask nodes, I overlooked that
we have two separate functions for determining
what transforms a node supports without offlines.

Since we claim that mask nodes support general
transform, they must certainly support 2d transforms
as well.

2 years agoStop binding textdomain for -properties
Matthias Clasen [Sat, 18 Mar 2023 03:35:45 +0000 (23:35 -0400)]
Stop binding textdomain for -properties

We don't have these translations anymore.

2 years agogtk-demo: Reset properties when the image changes
Matthias Clasen [Fri, 17 Mar 2023 15:48:44 +0000 (11:48 -0400)]
gtk-demo: Reset properties when the image changes

2 years agobroadway: Don't cause traffic when disconnecting
Matthias Clasen [Fri, 17 Mar 2023 14:59:05 +0000 (10:59 -0400)]
broadway: Don't cause traffic when disconnecting

The recently added transient-for support was causing
roundtrips when a client with transients disconnects,
leading to assertion failures. Avoid that.

2 years agodocs: Update broadway docs
Matthias Clasen [Fri, 17 Mar 2023 12:56:23 +0000 (08:56 -0400)]
docs: Update broadway docs

Using Broadway without broadwayd hasn't worked since 2013...

Fixes: #5662
2 years agogldriver: Quick workaround for filter mismatch
Benjamin Otte [Thu, 16 Mar 2023 22:36:00 +0000 (23:36 +0100)]
gldriver: Quick workaround for filter mismatch

We should really use texture views or samplers to handle this case for
shared textures, but this at least makes NEAREST not break.

2 years agolabel: Use GtkFileLauncher for file URI
Matthias Clasen [Thu, 16 Mar 2023 20:06:49 +0000 (16:06 -0400)]
label: Use GtkFileLauncher for file URI

The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.

If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.

Same fix as de3c1d0c73987225869908, for GtkLabel.

Fixes: #5671
2 years agolinkbutton: Use GtkFileLauncher for file URI
Emmanuele Bassi [Thu, 16 Mar 2023 12:09:55 +0000 (12:09 +0000)]
linkbutton: Use GtkFileLauncher for file URI

The GtkUriLauncher calls into the openuri portal, which distinguishes
between files, directories, and URI. The GtkFileLauncher contains logic
to deal with this, because it can already handle the file and folder
differences.

If we have a file:// URI it's easier to create a GFile out of it, and
use the GtkFileLauncher API, while leaving the GtkUriLauncher API for
every other URI scheme.

Fixes: #5671
2 years agotheme: Port .boxed-list style from libadwaita
Alexander Mikhaylenko [Thu, 9 Jun 2022 18:42:45 +0000 (22:42 +0400)]
theme: Port .boxed-list style from libadwaita

Consistently use it for boxed lists in inspector and gtk-demo.

Fixes issues like https://gitlab.gnome.org/GNOME/gtk/-/issues/3145

2 years agoMerge branch 'fix-410-tests' into 'gtk-4-10'
Matthias Clasen [Fri, 21 Apr 2023 05:55:14 +0000 (05:55 +0000)]
Merge branch 'fix-410-tests' into 'gtk-4-10'

testsuite: Fix broken test

See merge request GNOME/gtk!5855

2 years agoMerge branch 'cherry-pick-03b71a97' into 'gtk-4-10'
Matthias Clasen [Fri, 21 Apr 2023 05:42:51 +0000 (05:42 +0000)]
Merge branch 'cherry-pick-03b71a97' into 'gtk-4-10'

Merge branch 'wip/otte/for-main' into 'main'

See merge request GNOME/gtk!5854

2 years agotestsuite: Fix broken test
Benjamin Otte [Wed, 29 Mar 2023 01:52:44 +0000 (03:52 +0200)]
testsuite: Fix broken test

The test was referencing a nonexisting image.

Plus, node parsing cannot reference relative URLs.

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Thu, 20 Apr 2023 21:50:44 +0000 (21:50 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

testsuite: Be less verbose in accessor-apis test

Closes #5763

See merge request GNOME/gtk!5851

(cherry picked from commit 03b71a97599bedcc4203b6d12cdce88131167b99)

be5f2250 testsuite: Be less verbose in accessor-apis test
39583e40 testsuite: Allow accessors in interfaces
e47c0760 adjustment: Split out a function
75c47755 adjustment: sanity-check values when setting them
f393f70e listbase: Don't warn on scroll in empty list

2 years agoUpdate Turkish translation
Sabri Ünal [Wed, 19 Apr 2023 12:59:55 +0000 (12:59 +0000)]
Update Turkish translation

2 years agoMerge branch 'cherry-pick-faac2f78' into 'gtk-4-10'
Matthias Clasen [Tue, 11 Apr 2023 06:02:23 +0000 (06:02 +0000)]
Merge branch 'cherry-pick-faac2f78' into 'gtk-4-10'

filesystemmodel: Notify correct position removed in remove_file()

See merge request GNOME/gtk!5816

2 years agofilesystemmodel: Notify correct position removed in remove_file()
Corey Berla [Mon, 10 Apr 2023 19:56:08 +0000 (12:56 -0700)]
filesystemmodel: Notify correct position removed in remove_file()

32247bc50e63b709ae738a95a2ec71345b5fad75 made several changes to account for the
fact that we no longer have a NULL editable at the beginning of the list
model.  The commit mistakenly left out one change in remove_file(),
which causes the wrong file to be removed.

(cherry picked from commit faac2f7894608eef7e3884897b6a38da854e0fa8)

2 years agoUpdate Bulgarian translation
Alexander Shopov [Fri, 7 Apr 2023 16:26:55 +0000 (16:26 +0000)]
Update Bulgarian translation

2 years agoMerge branch 'cherry-pick-515f39f1' into 'gtk-4-10'
Matthias Clasen [Sat, 1 Apr 2023 12:48:49 +0000 (12:48 +0000)]
Merge branch 'cherry-pick-515f39f1' into 'gtk-4-10'

Merge branch 'wip/otte/for-main' into 'main'

See merge request GNOME/gtk!5760

2 years agoMerge branch 'cherry-picks-for-4-10' into 'gtk-4-10'
Matthias Clasen [Sat, 1 Apr 2023 01:23:44 +0000 (01:23 +0000)]
Merge branch 'cherry-picks-for-4-10' into 'gtk-4-10'

scrolledwindow: Disconnect the right handler

See merge request GNOME/gtk!5762

2 years agorendernodeparser: Emit error when failing to resolve URL
Benjamin Otte [Wed, 29 Mar 2023 00:28:01 +0000 (02:28 +0200)]
rendernodeparser: Emit error when failing to resolve URL

2 years agorendernodeparser: Failing to parse a string is an error
Benjamin Otte [Tue, 28 Mar 2023 19:09:01 +0000 (21:09 +0200)]
rendernodeparser: Failing to parse a string is an error

Testcase included.

2 years agowayland: Comply with protocol requirements
Matthias Clasen [Sun, 26 Mar 2023 13:47:46 +0000 (09:47 -0400)]
wayland: Comply with protocol requirements

If you send a bad anchor rect to mutter, it crashes.
Thats not great, so lets not do that.

2 years agogdk: Avoid a pointless indirection
Matthias Clasen [Tue, 28 Mar 2023 01:56:41 +0000 (21:56 -0400)]
gdk: Avoid a pointless indirection

Don't use g_fprintf if GLib is using system printf
anyway.

2 years agoImprove an error message
Matthias Clasen [Tue, 28 Mar 2023 01:44:56 +0000 (21:44 -0400)]
Improve an error message

We were producing a misleading error message
when gtk_init() fails.

Fixes: #5704
2 years agogdk: Improve logging for backends
Matthias Clasen [Tue, 28 Mar 2023 01:32:19 +0000 (21:32 -0400)]
gdk: Improve logging for backends

Log more when trying backends.

2 years agoenums: Move G_END_DECLS to the end of the file
Benjamin Otte [Sat, 25 Mar 2023 22:57:17 +0000 (23:57 +0100)]
enums: Move G_END_DECLS to the end of the file

2 years agodocs: Fix various broken links
Bilal Elmoussaoui [Mon, 27 Mar 2023 19:19:06 +0000 (21:19 +0200)]
docs: Fix various broken links

2 years agowayland/popup: Handle late received reposition feedback
Jonas Ådahl [Mon, 27 Mar 2023 19:27:44 +0000 (21:27 +0200)]
wayland/popup: Handle late received reposition feedback

If we map, reposition, unmap, remap, the reposition feedback from the
last time a popup was mapped might be received while we're dealing with
the new version of the popup. At this point, the old reposition token
has no meating, so lets drop it. Also reset the reposition tokens when
creating new protocol objects, so that the reposition token are as if
we're in the initial state.

This fixes an issue where we'd get stuck if repeatedly smashing a button
that'd create popups that'd immediately get dismissed by the compositor.

2 years agowayland: Try to open the display even if XDG_RUNTIME_DIR is unset
Ludovico de Nittis [Mon, 27 Mar 2023 09:53:57 +0000 (11:53 +0200)]
wayland: Try to open the display even if XDG_RUNTIME_DIR is unset

Since Wayland 1.15, it is now possible to use absolute paths in
"WAYLAND_DISPLAY".
In that scenario, having a valid "XDG_RUNTIME_DIR" is not a requirement
anymore.

For this reason we remove the "XDG_RUNTIME_DIR" check and we let
`wl_display_connect()` decide if our environment is correct.

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2 years agomagnifier: Don't check for visibility
Benjamin Otte [Mon, 27 Mar 2023 04:23:35 +0000 (06:23 +0200)]
magnifier: Don't check for visibility

gtk_widget_queue_draw() already does that.

2 years agoscrolledwindow: Disconnect the right handler
Matthias Clasen [Sun, 26 Mar 2023 14:55:08 +0000 (10:55 -0400)]
scrolledwindow: Disconnect the right handler

We connect gtk_scrolled_window_update_use_indicators
as signal handler in realize(), but we were disconnecting
gtk_scrolled_window_sync_use_indicators in unrealize.

Spotted by Milan Crha.

Fixes: #5684
2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Fri, 31 Mar 2023 15:58:03 +0000 (15:58 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

various fixes

See merge request GNOME/gtk!5756

(cherry picked from commit 515f39f161d73e4e58fcb58ed330db11c3bc8642)

6f417534 widget: Shortcut widget not repositioning
dbff49b5 listbase: Clear any newly set adjustments

2 years agoUpdate Bulgarian translation
Alexander Shopov [Fri, 31 Mar 2023 10:04:26 +0000 (10:04 +0000)]
Update Bulgarian translation

2 years agoUpdate Serbian translation
Марко Костић [Wed, 29 Mar 2023 11:28:23 +0000 (11:28 +0000)]
Update Serbian translation

2 years agoMerge branch 'cherry-pick-3a5282ab' into 'gtk-4-10'
Matthias Clasen [Wed, 29 Mar 2023 01:08:16 +0000 (01:08 +0000)]
Merge branch 'cherry-pick-3a5282ab' into 'gtk-4-10'

wayland: Don't crash without xdg_activation_v1

See merge request GNOME/gtk!5742

2 years agowayland: Don't crash without xdg_activation_v1
Matthias Clasen [Sun, 26 Mar 2023 14:11:14 +0000 (10:11 -0400)]
wayland: Don't crash without xdg_activation_v1

If the compositor does not support this protocol,
we can't use it.

Fixes: #5701
(cherry picked from commit 3a5282abe1aabebef7d276a01a36f7512cab4b9b)

2 years agoUpdate Chinese (China) translation
Boyuan Yang [Tue, 28 Mar 2023 15:14:10 +0000 (15:14 +0000)]
Update Chinese (China) translation

2 years agoUpdate French translation
Guillaume Bernard [Tue, 28 Mar 2023 09:36:51 +0000 (09:36 +0000)]
Update French translation

2 years agoMerge branch 'cursor-size-fix-4-10' into 'gtk-4-10'
Matthias Clasen [Sun, 26 Mar 2023 12:15:04 +0000 (12:15 +0000)]
Merge branch 'cursor-size-fix-4-10' into 'gtk-4-10'

wayland: Don't crash on cursor size 0

See merge request GNOME/gtk!5722

2 years agowayland: Don't crash on cursor size 0
Matthias Clasen [Sun, 26 Mar 2023 00:25:51 +0000 (20:25 -0400)]
wayland: Don't crash on cursor size 0

The cursor-theme-size setting is documented as
'0 means the default size'. Make it so by using
size 24 if we see a 0. Its better than crashing.

Fixes: #5700
2 years agoMerge branch 'cherry-pick-d209f556' into 'gtk-4-10'
Matthias Clasen [Fri, 24 Mar 2023 16:15:11 +0000 (16:15 +0000)]
Merge branch 'cherry-pick-d209f556' into 'gtk-4-10'

Backport !5702 (fix for #5685) into gtk-4-10

See merge request GNOME/gtk!5713

2 years agoMerge branch 'alternative-fix-5685' into 'main'
Chun-wei Fan [Fri, 24 Mar 2023 15:30:01 +0000 (15:30 +0000)]
Merge branch 'alternative-fix-5685' into 'main'

GDK/Win32: Use wgl* functions directly as needed (fix #5685)

Closes #5685

See merge request GNOME/gtk!5702

(cherry picked from commit d209f5567768aaa445d70a30424df2041ed3ac75)

627ee674 GDK-Win32: Add wrapper functions for calling core wgl* functions
b5ebe270 gtkgstsink.c: Drop workarounds needed for Windows

2 years agoMerge branch 'cherry-pick-7b22983b' into 'gtk-4-10'
Matthias Clasen [Fri, 24 Mar 2023 03:04:20 +0000 (03:04 +0000)]
Merge branch 'cherry-pick-7b22983b' into 'gtk-4-10'

Don't leak all AT contexts

See merge request GNOME/gtk!5703

2 years agoDon't leak all AT contexts
Matthias Clasen [Thu, 23 Mar 2023 03:41:40 +0000 (23:41 -0400)]
Don't leak all AT contexts

create_at_context was confused - it stored a reference
to the newly created context in priv->context, but then
also returned a reference, and the caller stored that
in priv->context again.

Change it to only return a reference.

Fixes: #5690
(cherry picked from commit 7b22983be58b7f96afa85399f0f7b86b0a4b8e09)

2 years agoMerge branch 'backport_next_accessible-sibling_fix' into 'gtk-4-10'
Emmanuele Bassi [Wed, 22 Mar 2023 16:02:15 +0000 (16:02 +0000)]
Merge branch 'backport_next_accessible-sibling_fix' into 'gtk-4-10'

a11y: Backport the gtk_accessible_get_next_accessible_sibling fix

See merge request GNOME/gtk!5699

2 years agoUpdate British English translation
Bruce Cowan [Wed, 22 Mar 2023 15:46:17 +0000 (15:46 +0000)]
Update British English translation

2 years agoMerge branch 'fix_next_accessible_sibling_after_refcounts' into 'main'
Matthias Clasen [Thu, 16 Mar 2023 21:12:20 +0000 (21:12 +0000)]
Merge branch 'fix_next_accessible_sibling_after_refcounts' into 'main'

a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which decided whether we will use the overridden sibling on the context.

See merge request GNOME/gtk!5659

2 years agoMerge branch 'cherry-pick-724ecf3b' into 'gtk-4-10'
Emmanuele Bassi [Wed, 22 Mar 2023 12:33:13 +0000 (12:33 +0000)]
Merge branch 'cherry-pick-724ecf3b' into 'gtk-4-10'

Ensure GtkFileChooserCell's type

See merge request GNOME/gtk!5697

2 years agoMerge branch 'ebassi/ensure-file-chooser-types' into 'main'
Matthias Clasen [Wed, 22 Mar 2023 10:48:55 +0000 (10:48 +0000)]
Merge branch 'ebassi/ensure-file-chooser-types' into 'main'

Ensure GtkFileChooserCell's type

See merge request GNOME/gtk!5696

(cherry picked from commit 724ecf3b51d18a7a9e00aa97c2c7eee2e3091ed9)

b2e8158c Ensure GtkFileChooserCell's type

2 years agoUpdate Slovenian translation
Martin [Mon, 20 Mar 2023 22:16:13 +0000 (22:16 +0000)]
Update Slovenian translation

2 years agoMerge branch 'cherry-pick-56b904f1-2' into 'gtk-4-10'
Benjamin Otte [Sun, 19 Mar 2023 17:33:38 +0000 (17:33 +0000)]
Merge branch 'cherry-pick-56b904f1-2' into 'gtk-4-10'

Merge branch 'wip/otte/for-main' into 'main'

See merge request GNOME/gtk!5683

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sun, 19 Mar 2023 17:07:53 +0000 (17:07 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

treelistmodel: Clear item in right place

Closes #5681

See merge request GNOME/gtk!5682

(cherry picked from commit 56b904f1e6edec67e95e6d6ea3004d73eb343121)

dd1e76e6 treelistmodel: Clear item in right place

2 years agoMerge branch 'cherry-pick-f211a217' into 'gtk-4-10'
Benjamin Otte [Sun, 19 Mar 2023 14:37:46 +0000 (14:37 +0000)]
Merge branch 'cherry-pick-f211a217' into 'gtk-4-10'

Merge branch 'wip/otte/for-main' into 'main'

See merge request GNOME/gtk!5679

2 years agoMerge branch 'for-4-10' into 'gtk-4-10'
Matthias Clasen [Sun, 19 Mar 2023 14:23:16 +0000 (14:23 +0000)]
Merge branch 'for-4-10' into 'gtk-4-10'

[4.10] Cherry-pick "listitem: Claim sequence when handling an event"

See merge request GNOME/gtk!5680

2 years agolistitem: Claim sequence when handling an event
Benjamin Otte [Thu, 16 Mar 2023 21:42:56 +0000 (22:42 +0100)]
listitem: Claim sequence when handling an event

See my rants on IRC for why we definitely need to claim gestures by
default in GTK5.

Fixes #5669

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sun, 19 Mar 2023 06:23:46 +0000 (06:23 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

Fix inspector doing weird stuff

Closes #5646

See merge request GNOME/gtk!5678

(cherry picked from commit f211a2177f6160c3678e30ee07263229c48ec3ef)

f4be5c80 cssnode: Refer the correct previous item
9048e391 treelistmodel: Cache the item
bf556850 treelistmodel: Track the item in the row
c4636852 treelistmodel: Clarify docs

2 years agoUpdate Persian translation
Danial Behzadi [Sat, 18 Mar 2023 01:10:45 +0000 (01:10 +0000)]
Update Persian translation

2 years agoMerge branch 'cherry-pick-565c9aed' into 'gtk-4-10'
Matthias Clasen [Fri, 17 Mar 2023 04:54:23 +0000 (04:54 +0000)]
Merge branch 'cherry-pick-565c9aed' into 'gtk-4-10'

Merge branch 'gridview-filler-tile-fix' into 'main'

See merge request GNOME/gtk!5666

2 years agoMerge branch 'gridview-filler-tile-fix' into 'main'
Benjamin Otte [Thu, 16 Mar 2023 23:50:13 +0000 (23:50 +0000)]
Merge branch 'gridview-filler-tile-fix' into 'main'

gridview: Fix condition for adding filler tiles

See merge request GNOME/gtk!5664

(cherry picked from commit 565c9aed946e5e4cd39e5c90a8352dc3607a0188)

65b6150e gridview: Fix condition for adding filler tiles

2 years agoMerge branch 'cherry-pick-fbc8bfb3' into 'gtk-4-10'
Benjamin Otte [Thu, 16 Mar 2023 21:46:28 +0000 (21:46 +0000)]
Merge branch 'cherry-pick-fbc8bfb3' into 'gtk-4-10'

Merge branch 'wip/otte/for-main' into 'main'

See merge request GNOME/gtk!5663

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Thu, 16 Mar 2023 20:59:17 +0000 (20:59 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

Various small fixes

Closes #5380

See merge request GNOME/gtk!5662

(cherry picked from commit fbc8bfb3031cbbdddc4978d6326d68ae19f3f3e3)

707c63c6 win32: Fix rowstride math
ef3c515c rowstrides are gsize, not int
a0382ef4 listview: Fix culling issues when using CSS padding

2 years agoMerge branch 'drag-gl-wayland-hotspot-fix-4-10' into 'gtk-4-10'
Matthias Clasen [Thu, 16 Mar 2023 19:48:45 +0000 (19:48 +0000)]
Merge branch 'drag-gl-wayland-hotspot-fix-4-10' into 'gtk-4-10'

[4.10] wayland: Reset pending offset in GL path

See merge request GNOME/gtk!5660

2 years agowayland: Reset pending offset in GL path
Ivan Molodetskikh [Wed, 15 Mar 2023 23:11:40 +0000 (16:11 -0700)]
wayland: Reset pending offset in GL path

Otherwise GL surfaces that redraw without changing the hotspot have it
applied on top every frame and quickly slide away.

The cairo path and the X11 backend do not have this bug.

2 years agoUpdate Indonesian translation
Kukuh Syafaat [Wed, 15 Mar 2023 12:03:47 +0000 (12:03 +0000)]
Update Indonesian translation

2 years agoUpdate Korean translation
Changwoo Ryu [Wed, 15 Mar 2023 10:04:10 +0000 (10:04 +0000)]
Update Korean translation

2 years agoUpdate Russian translation
Aleksandr Melman [Tue, 14 Mar 2023 21:01:53 +0000 (21:01 +0000)]
Update Russian translation

2 years agoUpdate Slovenian translation
Martin [Tue, 14 Mar 2023 17:19:43 +0000 (17:19 +0000)]
Update Slovenian translation

2 years agoMerge branch 'cherry-pick-a05b73cb' into 'gtk-4-10'
Benjamin Otte [Tue, 14 Mar 2023 16:32:44 +0000 (16:32 +0000)]
Merge branch 'cherry-pick-a05b73cb' into 'gtk-4-10'

Merge branch 'wip/hadess/children-left-msg' into 'main'

See merge request GNOME/gtk!5653

2 years agoMerge branch 'wip/hadess/children-left-msg' into 'main'
Benjamin Otte [Tue, 14 Mar 2023 16:31:44 +0000 (16:31 +0000)]
Merge branch 'wip/hadess/children-left-msg' into 'main'

gtk: Fix "children left" warning with fatal warnings

See merge request GNOME/gtk!5652

(cherry picked from commit a05b73cb05a407a23a670b30c8d3719fa94436b9)

4f1ea18c gtk: Fix "children left" warning with fatal warnings

2 years agoPost-release version bump
Matthias Clasen [Tue, 14 Mar 2023 12:16:30 +0000 (08:16 -0400)]
Post-release version bump

2 years ago4.10.1
Matthias Clasen [Mon, 13 Mar 2023 14:58:58 +0000 (15:58 +0100)]
4.10.1

2 years agoUpdated Spanish translation
Daniel [Tue, 14 Mar 2023 11:43:00 +0000 (12:43 +0100)]
Updated Spanish translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 14 Mar 2023 05:30:17 +0000 (05:30 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gsk: Mark mask nodes as 'supports transforms'

See merge request GNOME/gtk!5650

2 years agocss: Small speedups
Matthias Clasen [Mon, 13 Mar 2023 21:20:12 +0000 (22:20 +0100)]
css: Small speedups

2 years agoicontheme: Silence a compiler warning
Matthias Clasen [Mon, 13 Mar 2023 21:19:51 +0000 (22:19 +0100)]
icontheme: Silence a compiler warning

2 years agotests: Add more tests for texture scale nodes
Matthias Clasen [Mon, 13 Mar 2023 17:20:02 +0000 (18:20 +0100)]
tests: Add more tests for texture scale nodes

2 years agogsk: Mark mask nodes as 'supports transforms'
Matthias Clasen [Mon, 13 Mar 2023 17:10:53 +0000 (18:10 +0100)]
gsk: Mark mask nodes as 'supports transforms'

Just like blur nodes, the renderer can handle
these without creating an extra offscreen.

2 years agoMerge branch 'fix-texture-scale-rotation' into 'main'
Matthias Clasen [Tue, 14 Mar 2023 05:08:37 +0000 (05:08 +0000)]
Merge branch 'fix-texture-scale-rotation' into 'main'

gtk4-demo: Polish the image scaling demo

See merge request GNOME/gtk!5649

2 years agoMerge branch 'bilelmoussaoui-main-patch-31679' into 'main'
Benjamin Otte [Tue, 14 Mar 2023 05:03:13 +0000 (05:03 +0000)]
Merge branch 'bilelmoussaoui-main-patch-31679' into 'main'

GLTexture: Add GL_RGB format support

See merge request GNOME/gtk!5647

2 years agogsk: Fix rotated texture scale nodes
Matthias Clasen [Mon, 13 Mar 2023 16:59:04 +0000 (17:59 +0100)]
gsk: Fix rotated texture scale nodes

This was causing us to render rotated texture scale
nodes to an unclipped offscreen, bringing 'giant
intermediate texture' problems back.