gtk4.git
2 years agobuild: Handle introspection a bit better
Matthias Clasen [Wed, 8 Mar 2023 02:20:43 +0000 (21:20 -0500)]
build: Handle introspection a bit better

Error out if introspection is requested,
but g-ir-scanner isn't found.

And if introspection isn't explicitly disabled
but is required for building the docs, build it.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 8 Mar 2023 02:31:19 +0000 (02:31 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

filechooser: Handle pathless files

See merge request GNOME/gtk!5613

2 years agoMerge branch 'expose_checkable_state' into 'main'
Matthias Clasen [Wed, 8 Mar 2023 02:07:39 +0000 (02:07 +0000)]
Merge branch 'expose_checkable_state' into 'main'

a11y: When an accessible has GTK_STATE_CHECKED, set its ATSPI_STATE_CHECKABLE as well

See merge request GNOME/gtk!5602

2 years agofilechooser: Handle pathless files
Matthias Clasen [Wed, 8 Mar 2023 01:54:31 +0000 (20:54 -0500)]
filechooser: Handle pathless files

g_file_get_path() can return NULL. Make our
getter for file locations handle that case.

Related: !5610

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 8 Mar 2023 01:46:43 +0000 (01:46 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

wayland: Don't crash during DND with Cairo renderer

See merge request GNOME/gtk!5612

2 years agowayland: Don't crash during DND with Cairo renderer
Benjamin Otte [Tue, 7 Mar 2023 04:50:08 +0000 (05:50 +0100)]
wayland: Don't crash during DND with Cairo renderer

Attaching buffers with offsets is forbidden now and nobody
checked the Cairo renderer.

2 years agotext: Don't crash when somebody drops NULL
Benjamin Otte [Tue, 7 Mar 2023 03:45:35 +0000 (04:45 +0100)]
text: Don't crash when somebody drops NULL

2 years agoMerge branch 'wroy-main-patch-03255' into 'main'
Emmanuele Bassi [Tue, 7 Mar 2023 23:48:25 +0000 (23:48 +0000)]
Merge branch 'wroy-main-patch-03255' into 'main'

MSBuild: Fix gnome.compile_resources current source directory

See merge request GNOME/gtk!5609

2 years agoApply suggestion to use '/' over join_paths
Emmanuele Bassi [Tue, 7 Mar 2023 22:40:17 +0000 (22:40 +0000)]
Apply suggestion to use '/' over join_paths

2 years agoFix compile_resources present source directory
William Roy [Tue, 7 Mar 2023 21:59:50 +0000 (21:59 +0000)]
Fix compile_resources present source directory

In certain scenarios, address the issue where gnome.compile_resources
fails to transmit the present source directory. This is most notably
visible with MSBuild.

2 years agoMerge branch 'unbreak-combobox' into 'main'
Matthias Clasen [Tue, 7 Mar 2023 19:10:51 +0000 (19:10 +0000)]
Merge branch 'unbreak-combobox' into 'main'

combobox: Avoid extra queue_resize()

Closes #5644

See merge request GNOME/gtk!5608

2 years agoUpdated Danish translation
Ask Hjorth Larsen [Tue, 7 Mar 2023 19:02:40 +0000 (20:02 +0100)]
Updated Danish translation

2 years agocombobox: Avoid extra queue_resize()
Ivan Molodetskikh [Tue, 7 Mar 2023 17:51:32 +0000 (09:51 -0800)]
combobox: Avoid extra queue_resize()

width-request already ensures it's above the minimum width, so avoid an
extra queue_resize() when setting size request to (-1, -1).

This is the same way as GtkDropDown works. This also unbreaks
GtkComboBox after the recent allocation fix in
75a417e33708dab2bdb2f784a8952e085a12bf03.

Incidentally, this also makes GtkComboBox actually resize its popup as
intended (that was broken before).

I don't think this is ultimately the final fix, sometimes I still get
allocation warnings. But the proper fix will probably involve changing
some more allocation machinery around popovers. This is good enough for
now.

2 years agoMerge branch 'window-signals' into 'main'
Matthias Clasen [Tue, 7 Mar 2023 13:15:21 +0000 (13:15 +0000)]
Merge branch 'window-signals' into 'main'

window: Disconnect the ::compute-size handler

See merge request GNOME/gtk!5606

2 years agowindow: Disconnect the ::compute-size handler
Matthias Clasen [Tue, 7 Mar 2023 11:40:25 +0000 (06:40 -0500)]
window: Disconnect the ::compute-size handler

All the other signal handlers are connected in
realize and disconnected in unrealize, but the
::compute-size handler was forgotten.

This was notices in !5597.

2 years agoMerge branch 'expose_landmark_role' into 'main'
Matthias Clasen [Mon, 6 Mar 2023 17:49:05 +0000 (17:49 +0000)]
Merge branch 'expose_landmark_role' into 'main'

a11y: Expose GTK_ACCESSIBLE_ROLE_LANDMARK to AtSPI2

See merge request GNOME/gtk!5601

2 years agoa11y: When an accessible has GTK_STATE_CHECKED, set its ATSPI_STATE_CHECKABLE as...
Lukáš Tyrychtr [Mon, 6 Mar 2023 16:15:54 +0000 (17:15 +0100)]
a11y: When an accessible has GTK_STATE_CHECKED, set its ATSPI_STATE_CHECKABLE as well

This allows, for example, checkable list itemss.

2 years agoa11y: Expose GTK_ACCESSIBLE_ROLE_LANDMARK to AtSPI2
Lukáš Tyrychtr [Mon, 6 Mar 2023 15:45:19 +0000 (16:45 +0100)]
a11y: Expose GTK_ACCESSIBLE_ROLE_LANDMARK to AtSPI2

2 years agoUpdate Czech translation
Marek Černocký [Mon, 6 Mar 2023 11:57:22 +0000 (11:57 +0000)]
Update Czech translation

2 years agoMerge branch 'wip/exalm/template' into 'main'
Emmanuele Bassi [Mon, 6 Mar 2023 11:00:04 +0000 (11:00 +0000)]
Merge branch 'wip/exalm/template' into 'main'

widget: Use the correct template in dispose_template()

See merge request GNOME/gtk!5600

2 years agoMerge branch 'main' into 'main'
Matthias Clasen [Mon, 6 Mar 2023 05:52:00 +0000 (05:52 +0000)]
Merge branch 'main' into 'main'

removed duplicate function call

See merge request GNOME/gtk!5545

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 6 Mar 2023 05:50:36 +0000 (05:50 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

macos: Fix type func generation

See merge request GNOME/gtk!5596

2 years agoMerge branch 'wip/fix-wl-destruct-order' into 'main'
Matthias Clasen [Mon, 6 Mar 2023 05:08:44 +0000 (05:08 +0000)]
Merge branch 'wip/fix-wl-destruct-order' into 'main'

wayland: Destroy xdg_surface after role

See merge request GNOME/gtk!5598

2 years agowidget: Use the correct template in dispose_template()
Alexander Mikhaylenko [Mon, 6 Mar 2023 01:36:16 +0000 (05:36 +0400)]
widget: Use the correct template in dispose_template()

In derivable classes, the widget's class can be different from the one
dispose_template() was called for, which can lead to failing the
template != NULL check at best, undefined behavior at worst.

Since we already pass the correct GType into the function, just use that
instead.

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

inspector: Make really sure we don't inspect ourselves

See merge request GNOME/gtk!5599

2 years agoinspector: Make really sure we don't inspect ourselves
Benjamin Otte [Sun, 5 Mar 2023 23:13:53 +0000 (00:13 +0100)]
inspector: Make really sure we don't inspect ourselves

The problem here is that new windows appear in the list before the
window's dispay gets set and we don't update the filter when the
display changes (would need watches support for the filtermodel).

So add this somewhat hacky method.

2 years agowayland: Destroy xdg_surface after role
Jonas Ådahl [Sun, 5 Mar 2023 19:54:40 +0000 (20:54 +0100)]
wayland: Destroy xdg_surface after role

The split-up of gdksurface-wayland.c introduced a protocol violation
when it didn't make sure xdg_surface was destroyed after the role
objects (xdg_popup / xdg_toplevel). Fix that.

Fixes: 2a463baed0 ("wayland: Rearrange the surface code")
2 years agomacos: Fix type func generation
Matthias Clasen [Sun, 5 Mar 2023 17:20:50 +0000 (09:20 -0800)]
macos: Fix type func generation

We were checking for gdk_quartz even though
the sysbols are now all called gdk_macos. Oops.

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

cssnode: Don't crash the inspector

See merge request GNOME/gtk!5595

2 years agotestsuite: Add tests for the unknown enums
Benjamin Otte [Mon, 13 Feb 2023 07:39:54 +0000 (08:39 +0100)]
testsuite: Add tests for the unknown enums

See commit 40e7a265a7ccb1385a3af0931c591201b0ce063a

2 years agotestsuite: Add empty test for new node
Benjamin Otte [Mon, 13 Feb 2023 06:59:15 +0000 (07:59 +0100)]
testsuite: Add empty test for new node

2 years agocssnode: Don't crash the inspector
Benjamin Otte [Sun, 5 Mar 2023 17:30:45 +0000 (18:30 +0100)]
cssnode: Don't crash the inspector

Don't misinform the observing listmodel that CSS nodes were removed that
weren't actually removed, but just moved. Otherwise the observer would
think it has run out of items when it really hasn't.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 5 Mar 2023 16:51:23 +0000 (16:51 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

meson: Mention testsuite in summary

See merge request GNOME/gtk!5594

2 years agomeson: Mention testsuite in summary
Matthias Clasen [Sun, 5 Mar 2023 16:10:12 +0000 (08:10 -0800)]
meson: Mention testsuite in summary

This was broken out from the 'tests' toggle,
so list it separately.

2 years agoMerge branch 'expose_error_message_relation' into 'main'
Matthias Clasen [Sun, 5 Mar 2023 16:08:38 +0000 (16:08 +0000)]
Merge branch 'expose_error_message_relation' into 'main'

a11y: Expose GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE to AtSPI2

See merge request GNOME/gtk!5588

2 years agoMerge branch 'wip/otte/listview2' into 'main'
Benjamin Otte [Sun, 5 Mar 2023 15:53:43 +0000 (15:53 +0000)]
Merge branch 'wip/otte/listview2' into 'main'

listview: GtkListTile

See merge request GNOME/gtk!5584

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 5 Mar 2023 15:46:13 +0000 (15:46 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

ci: Disable the testsuite in flatpak builds

See merge request GNOME/gtk!5593

2 years agoci: Disable the testsuite in flatpak builds
Matthias Clasen [Sun, 5 Mar 2023 15:23:20 +0000 (07:23 -0800)]
ci: Disable the testsuite in flatpak builds

No need to build the testsuite when we are
just producing flatpaks.

2 years agolistbase: Remove nonexisting function from header
Benjamin Otte [Sat, 4 Mar 2023 14:43:26 +0000 (15:43 +0100)]
listbase: Remove nonexisting function from header

2 years agogridview: Add a filler tile for empty space
Benjamin Otte [Sat, 4 Mar 2023 02:32:12 +0000 (03:32 +0100)]
gridview: Add a filler tile for empty space

That stupid space in the bottom right when n_items isn't a multiple of
n_columns needs its own tile, or we'll get errors about not finding a
tile.

So make one.

2 years agocolumnview: Clear the sorter first thing in dispose
Benjamin Otte [Fri, 3 Mar 2023 02:05:22 +0000 (03:05 +0100)]
columnview: Clear the sorter first thing in dispose

Otherwise, when removing the columns, each column will trigger a
sorter::changed signal emission.

And because sorters are often still connected to a sortlistmodel, we
can't skip that emission and need to do it.
But we only need to do it once.

2 years agolistview: Handle emptying of views
Benjamin Otte [Fri, 3 Mar 2023 01:38:24 +0000 (02:38 +0100)]
listview: Handle emptying of views

The previous check does not longer work.

When a model gets all items deleted, there will still be existing tiles
until the next time garbage collection is run.
So do that before checking if the list is empty.

2 years agolistview: Remove an unused member variable
Benjamin Otte [Fri, 3 Mar 2023 01:35:56 +0000 (02:35 +0100)]
listview: Remove an unused member variable

It's only used in the allocate function, so make it a local varaible
there.

2 years agolistview: Simplify a vfunc
Benjamin Otte [Fri, 3 Mar 2023 01:20:17 +0000 (02:20 +0100)]
listview: Simplify a vfunc

Instead of making it 2 vfuncs for getting horizontal and vertical area,
make it one vfunc to get the area.

Also rewrite the implementations to use the tile's area instead of
trying to deduce things with fancy math.

2 years agolistview: Simplify allocation
Benjamin Otte [Thu, 2 Mar 2023 20:27:52 +0000 (21:27 +0100)]
listview: Simplify allocation

With the Tile changes, a lot of stuff does no longer need to be
duplicated between listview and gridview. Move it to ListBase instead.

2 years agogridview: Remove an unused member variable
Benjamin Otte [Thu, 2 Mar 2023 04:46:16 +0000 (05:46 +0100)]
gridview: Remove an unused member variable

It's only used during size_allocate(), so make it a local variable
there.

2 years agolistitemmanager: Add a split vfunc and use it
Benjamin Otte [Thu, 2 Mar 2023 02:53:56 +0000 (03:53 +0100)]
listitemmanager: Add a split vfunc and use it

Instead of randomly changing tiles, the listitemmanager gains a split
vfunc that listview and gridview implement so they can keep their tile
areas intact. The listitemmanager will now conform to these rules:

1. Never delete a tile.
   This ensures that all areas stay intact.

2. Never change the n_items of a tile other than setting them to 0.
   This causes "empty" areas to appear, but listview/gridview can
   easily check for them by checking for tile->n_items == 0.
   gtk_list_tile_gc() will get rid of them.

3. Adding items always creates new tiles that are added with empty area.
   That way they don't interrupt any existing machinery until the next
   allocation.

4. Adding/removing widgets has no effect on areas
   This is useful in particular when scrolling where new widgets are
   moving between tiles. When the manager moves the widgets, it may
   split some areas, but will not remove any existing tiles, so the
   whole area stays intact and the list can deal with further scroll
   events before an allocation.

This improve the situation for #3334

2 years agolistview: Add gc'ing
Benjamin Otte [Thu, 2 Mar 2023 02:26:58 +0000 (03:26 +0100)]
listview: Add gc'ing

This is in preparation for the following reorg of the listitemmanager,
it should not have any effect now.

2 years agolistitemmanager: Remove unused functionality
Benjamin Otte [Wed, 1 Mar 2023 14:39:11 +0000 (15:39 +0100)]
listitemmanager: Remove unused functionality

Both ListView and GridView use GtkListTile now, so no need anymore for
custom machinery.

2 years agogridview: Redo tile management
Benjamin Otte [Wed, 1 Mar 2023 14:25:17 +0000 (15:25 +0100)]
gridview: Redo tile management

Instead of the custom size property, use the new tile size.

Also introduce the ability to split tiles, so that gridview can split a
layout that would look like (question mark denoting cells without a
widget, which in this case would be a single tile)

█ █ █ ? ?
? ? ? ? ?
? ? ? ? ?
? ? ?

into 3 rectangular tiles like so:

█ █ █ A A
B B B B B
B B B B B
C C C

This of course also means we need to be able to merge those tiles again
when cells got added/deleted or the gridview was resized. For that job,
gtk_list_tile_gc() exists now, which removes tiles without items and
merges adjacent tiles without widgets.

2 years agolistview: Get rid of ListRow and its height
Benjamin Otte [Wed, 22 Feb 2023 23:30:26 +0000 (00:30 +0100)]
listview: Get rid of ListRow and its height

Use the tiles' area instead.

2 years agolist: Allow storing size in the ListTile
Benjamin Otte [Wed, 22 Feb 2023 22:33:16 +0000 (23:33 +0100)]
list: Allow storing size in the ListTile

... and use it to handle ListView allocations.

Nothing spectacular, just proof of concept.

The code introduces the idea that every tile stores its area (others
would call it "allocation", but I avoided that because tiles aren't
widgets). This should allow moving lots of code into gtklistbase.c and
not require special handling inside ListView and GridView.

And that in turn hopefully makes it easier to add more features (like
sections and so on.)

2 years agolist: Make GtkListTile more prominent
Benjamin Otte [Wed, 22 Feb 2023 12:04:36 +0000 (13:04 +0100)]
list: Make GtkListTile more prominent

* Instead of using a gpointer to refer to it, use the GtkListTile type.

* Use gtk_list_tile_get_foo() instead of
  gtk_list_item_manager_get_tile_foo() naming.

2 years agolist: Rename GtkListItemManagerItem => GtkListTile
Benjamin Otte [Wed, 22 Feb 2023 11:51:26 +0000 (12:51 +0100)]
list: Rename GtkListItemManagerItem => GtkListTile

That's a good description for what the job of those elements is:
They're a tile in the lists scrollable area.

2 years agorendernodepaintable: Allow the node to be NULL
Benjamin Otte [Sat, 4 Mar 2023 17:11:36 +0000 (18:11 +0100)]
rendernodepaintable: Allow the node to be NULL

This can happen when creating paintables from GtkSnapshot when nothing
was drawn.

2 years agoUpdate Catalan translation
Jordi Mas [Sun, 5 Mar 2023 08:44:49 +0000 (09:44 +0100)]
Update Catalan translation

2 years agoPost-release version bump
Matthias Clasen [Sat, 4 Mar 2023 21:47:37 +0000 (13:47 -0800)]
Post-release version bump

2 years ago4.10.0
Matthias Clasen [Sat, 4 Mar 2023 16:28:12 +0000 (08:28 -0800)]
4.10.0

2 years agoMerge branch 'ebassi/file-info-attributes' into 'main'
Emmanuele Bassi [Sat, 4 Mar 2023 16:04:04 +0000 (16:04 +0000)]
Merge branch 'ebassi/file-info-attributes' into 'main'

Check for attributes being available before querying them

See merge request GNOME/gtk!5592

2 years agoMerge branch 'wip/otte/dont-scale-or-it-breaks' into 'main'
Matthias Clasen [Sat, 4 Mar 2023 15:57:49 +0000 (15:57 +0000)]
Merge branch 'wip/otte/dont-scale-or-it-breaks' into 'main'

Add a test for lots of texture scaling and fix the fallout

See merge request GNOME/gtk!5509

2 years agoCheck for attributes being available before querying them
Emmanuele Bassi [Sat, 4 Mar 2023 00:02:52 +0000 (00:02 +0000)]
Check for attributes being available before querying them

GLib 2.75 started checking if a GFileInfo was created with the attribute
we're querying, instead of failing silently and leaving us in an
inconsistent state.

Turns out that GtkFileChooserWidget, GtkFileSystemModel, and GtkPathBar
trip the newly introduced check.

2 years agoMerge branch 'wip/chergert/fix-action-activation-crash' into 'main'
Emmanuele Bassi [Sat, 4 Mar 2023 15:16:59 +0000 (15:16 +0000)]
Merge branch 'wip/chergert/fix-action-activation-crash' into 'main'

inspector: be defensive against out parameters

See merge request GNOME/gtk!5591

2 years agoMerge branch 'ebassi/stack-page-fix' into 'main'
Emmanuele Bassi [Sat, 4 Mar 2023 15:16:34 +0000 (15:16 +0000)]
Merge branch 'ebassi/stack-page-fix' into 'main'

a11y: Fix GtkStackPage first accessible child

See merge request GNOME/gtk!5590

2 years agoUpdate Russian translation
Aleksandr Melman [Sat, 4 Mar 2023 15:05:45 +0000 (15:05 +0000)]
Update Russian translation

2 years agoUpdate Polish translation
Piotr Drąg [Sat, 4 Mar 2023 14:59:29 +0000 (15:59 +0100)]
Update Polish translation

2 years agotestsuite: Add a test for stripes
Benjamin Otte [Sat, 4 Mar 2023 01:50:38 +0000 (02:50 +0100)]
testsuite: Add a test for stripes

The GL renderer was creating sripes for nodes that were scaled in
particular ways, probably due to rounding errors.

This testsuite focuses on one of those stripes to make sure they are
gone.

2 years agoa11y: Use weak references for GtkATContext cached accessibles
Emmanuele Bassi [Fri, 3 Mar 2023 21:10:39 +0000 (21:10 +0000)]
a11y: Use weak references for GtkATContext cached accessibles

The accessible objects already own the GtkATContext, let's avoid a
reference cycle.

2 years agostack: Don't recreate at contexts in dispose
Matthias Clasen [Fri, 3 Mar 2023 13:44:29 +0000 (08:44 -0500)]
stack: Don't recreate at contexts in dispose

This is the same protection we have in
GtkWidgetAccessible.

2 years agoa11y: Plug reference leaks
Emmanuele Bassi [Fri, 3 Mar 2023 19:07:16 +0000 (19:07 +0000)]
a11y: Plug reference leaks

The gtk_accessible_get_at_context() getter is now transfer full, which
means we need to drop the reference when getting the GtkATContext.

2 years agoinspector: be defensive against out parameters
Christian Hergert [Fri, 3 Mar 2023 20:17:07 +0000 (12:17 -0800)]
inspector: be defensive against out parameters

Set initial state to NULL so that we don't risk accessing an unset out
parameter.

Fixes a crash when activating certain actions.

2 years agoa11y: Simplify bookkeeping while iterating accessible children
Emmanuele Bassi [Fri, 3 Mar 2023 16:47:39 +0000 (16:47 +0000)]
a11y: Simplify bookkeeping while iterating accessible children

2 years agoa11y: Fix GtkStackPage first accessible child
Emmanuele Bassi [Fri, 3 Mar 2023 15:28:27 +0000 (15:28 +0000)]
a11y: Fix GtkStackPage first accessible child

The first accessible child is the child widget of the GtkStackPage, not
the first child of the widget.

2 years agotestsuite: Add a test for large scale nodes
Benjamin Otte [Mon, 13 Feb 2023 00:44:18 +0000 (01:44 +0100)]
testsuite: Add a test for large scale nodes

This test fails if we naively create fullscale
intermediate offscreens. This was fixed in the
previous commits.

This tests the fixes in 22ba6b1f33dcbcab8d (for
cairo) and 3a0152b65fd75f631b76 (for GL).

2 years agogl: Respect clip wehn drawing scale nodes
Matthias Clasen [Thu, 16 Feb 2023 01:10:58 +0000 (20:10 -0500)]
gl: Respect clip wehn drawing scale nodes

Use the same approach and only create an offscreen
that is big enough for the clipped part of the scaled
texture.

If the clipped part is still too large for a single
texture, we give up and just render the texture without
filters (using the regular texture rendering code path
which supports slicing).

The following commit will add the texture-scale-magnify-10000x
test which fails without this fix.

2 years agorendernode: Respect clip when drawing scale nodes
Benjamin Otte [Mon, 13 Feb 2023 00:44:48 +0000 (01:44 +0100)]
rendernode: Respect clip when drawing scale nodes

Scale nodes can use large scale factors and we don't want to create
insanely huge Cairo surfaces.

A subsequent commit will add the texture-scale-magnify-10000x
test which fails without this fix.

2 years agorendernode: Clarify some Cairo stuff
Benjamin Otte [Mon, 13 Feb 2023 00:31:12 +0000 (01:31 +0100)]
rendernode: Clarify some Cairo stuff

Split out a function to make it more obvious what's going on.

2 years agorendernode: Don't do unnecessary stuff
Benjamin Otte [Mon, 13 Feb 2023 00:23:28 +0000 (01:23 +0100)]
rendernode: Don't do unnecessary stuff

Cairo surfaces are created transparent.

And even if they weren't, overdrawing with transparency wouldn't erase
what's in the surface because it's a no-op.

It would require CAIRO_OPERATOR_CLEAR or CAIRO_OPERATOR_SOURCE.

2 years agoFixes for gdk_memory_texture_new_subtexture checks
Benjamin Otte [Mon, 13 Feb 2023 00:08:53 +0000 (01:08 +0100)]
Fixes for gdk_memory_texture_new_subtexture checks

There were several mistakes here.

2 years agoUpdate Korean translation
Changwoo Ryu [Fri, 3 Mar 2023 15:36:03 +0000 (15:36 +0000)]
Update Korean translation

2 years agoa11y: Expose GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE to AtSPI2
Lukáš Tyrychtr [Fri, 3 Mar 2023 14:15:59 +0000 (15:15 +0100)]
a11y: Expose GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE to AtSPI2

Also, update the AtSPI2 relations to match the 1.26 version of AtSPI2.

2 years agoMerge branch 'ebassi/accessible-transfer-full' into 'main'
Matthias Clasen [Fri, 3 Mar 2023 09:46:51 +0000 (09:46 +0000)]
Merge branch 'ebassi/accessible-transfer-full' into 'main'

Mark Accessible getters as transfer full

Closes #5615

See merge request GNOME/gtk!5586

2 years agoMark Accessible getters as transfer full
Emmanuele Bassi [Fri, 24 Feb 2023 12:10:16 +0000 (12:10 +0000)]
Mark Accessible getters as transfer full

GtkAccessible implementations in C can get away returning objects just
by shuffling pointers around, but higher level languages prefer using
full ownership transfer in virtual functions.

Fixes: #5615
2 years agoMerge branch 'expose_details_relation' into 'main'
Emmanuele Bassi [Fri, 3 Mar 2023 01:55:48 +0000 (01:55 +0000)]
Merge branch 'expose_details_relation' into 'main'

a11y: Expose GTK_ACCESSIBLE_RELATION_DETAILS to at-spi2

See merge request GNOME/gtk!5580

2 years agoMerge branch 'fix_section_role' into 'main'
Emmanuele Bassi [Fri, 3 Mar 2023 01:54:51 +0000 (01:54 +0000)]
Merge branch 'fix_section_role' into 'main'

a11y: Fix mapping of GTK_ACCESSIBLE_ROLE_PRESENTATION

See merge request GNOME/gtk!5576

2 years agoMerge branch 'ebassi/atcontext-dispose' into 'main'
Matthias Clasen [Fri, 3 Mar 2023 01:54:38 +0000 (01:54 +0000)]
Merge branch 'ebassi/atcontext-dispose' into 'main'

a11y: Clear the accessible tree in GtkATContext

See merge request GNOME/gtk!5587

2 years agoRevert "stack: clear accessible parent when removing child"
Emmanuele Bassi [Fri, 3 Mar 2023 01:39:24 +0000 (01:39 +0000)]
Revert "stack: clear accessible parent when removing child"

This reverts commit 40d4441fd85742837d85d8509dc89355d39a1cdc.

The accessible parent of the child widget in a GtkStackPage is cleared
when the GtkATContext gets disposed, so we don't need to unset it
ourselves. This also avoids a temporary vivification of the GtkATContext
during dispose.

2 years agoa11y: Clear the accessible tree in GtkATContext
Emmanuele Bassi [Fri, 3 Mar 2023 01:38:27 +0000 (01:38 +0000)]
a11y: Clear the accessible tree in GtkATContext

We acquire a reference on the accessible objects, so we need to release
it when disposing the GtkATContext.

2 years agoUpdate Hungarian translation
Balázs Úr [Fri, 3 Mar 2023 00:35:25 +0000 (00:35 +0000)]
Update Hungarian translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Fri, 3 Mar 2023 00:19:38 +0000 (00:19 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

impcontextsimple: Return from GTask

See merge request GNOME/gtk!5585

2 years agoimpcontextsimple: Return from GTask
Matthias Clasen [Thu, 2 Mar 2023 21:17:48 +0000 (16:17 -0500)]
impcontextsimple: Return from GTask

GLib complains about this now, so do it.

2 years agoMerge branch 'leak-fix' into 'main'
Emmanuele Bassi [Wed, 1 Mar 2023 20:41:53 +0000 (20:41 +0000)]
Merge branch 'leak-fix' into 'main'

gtkatspicontext: Fix a leak of a floating GVariant

See merge request GNOME/gtk!5583

2 years agogtkatspicontext: Fix a leak of a floating GVariant
Philip Withnall [Wed, 1 Mar 2023 19:40:56 +0000 (19:40 +0000)]
gtkatspicontext: Fix a leak of a floating GVariant

If the early return path in `emit_property_changed()` is taken, and
`value` is floating, it will be leaked. Fix that by sinking `value` on
entry to the function.

Spotted by asan:
```
Direct leak of 128 byte(s) in 2 object(s) allocated from:
    #0 0x7f44774ba6af in __interceptor_malloc (/lib64/libasan.so.8+0xba6af)
    #1 0x7f44764c941a in g_malloc ../../source/glib/glib/gmem.c:130
    #2 0x7f44764f6d8a in g_slice_alloc ../../source/glib/glib/gslice.c:252
    #3 0x7f447654655d in g_variant_alloc ../../source/glib/glib/gvariant-core.c:565
    #4 0x7f447654664c in g_variant_new_from_bytes ../../source/glib/glib/gvariant-core.c:608
    #5 0x7f4476536ed5 in g_variant_new_take_string ../../source/glib/glib/gvariant.c:1307
    #6 0x7f4475c75ada in gtk_at_spi_context_state_change ../../source/gtk4/gtk/a11y/gtkatspicontext.c:1112
    #7 0x7f44758ee194 in gtk_at_context_update ../../source/gtk4/gtk/gtkatcontext.c:694
    #8 0x7f44758dbfcf in gtk_accessible_update_property ../../source/gtk4/gtk/gtkaccessible.c:326
    #9 0x7f4475b5abe3 in gtk_widget_set_tooltip_text ../../source/gtk4/gtk/gtkwidget.c:9740
    #10 0x58439d in gs_updates_page_update_ui_state ../../source/gnome-software/src/gs-updates-page.c:302
    #11 0x5857dc in gs_updates_page_set_state ../../source/gnome-software/src/gs-updates-page.c:403
    #12 0x5879f1 in gs_updates_page_load ../../source/gnome-software/src/gs-updates-page.c:636
    #13 0x58822d in gs_updates_page_reload ../../source/gnome-software/src/gs-updates-page.c:678
    #14 0x50ff48 in gs_page_reload ../../source/gnome-software/src/gs-page.c:731
    #15 0x5491ce in gs_shell_reload_cb ../../source/gnome-software/src/gs-shell.c:830
    #16 0x7f4477363f54 in g_cclosure_marshal_VOID__VOID ../../source/glib/gobject/gmarshal.c:117
    #17 0x7f447735e0ad in g_closure_invoke ../../source/glib/gobject/gclosure.c:832
    #18 0x7f4477391f3f in signal_emit_unlocked_R ../../source/glib/gobject/gsignal.c:3802
    #19 0x7f4477390c13 in g_signal_emit_valist ../../source/glib/gobject/gsignal.c:3555
    #20 0x7f4477391324 in g_signal_emit ../../source/glib/gobject/gsignal.c:3612
    #21 0x7f447705b3c3 in gs_plugin_loader_reload_delay_cb ../../source/gnome-software/lib/gs-plugin-loader.c:1538
    #22 0x7f44764bd140 in g_timeout_dispatch ../../source/glib/glib/gmain.c:5054
    #23 0x7f44764b9eb1 in g_main_dispatch ../../source/glib/glib/gmain.c:3460
    #24 0x7f44764bb72c in g_main_context_dispatch ../../source/glib/glib/gmain.c:4200
    #25 0x7f44764bba15 in g_main_context_iterate ../../source/glib/glib/gmain.c:4276
    #26 0x7f44764bbbfa in g_main_context_iteration ../../source/glib/glib/gmain.c:4343
    #27 0x7f44769ef655 in g_application_run ../../source/glib/gio/gapplication.c:2589
    #28 0x4f2da5 in main ../../source/gnome-software/src/gs-main.c:49
    #29 0x7f4474e4a50f in __libc_start_call_main (/lib64/libc.so.6+0x2750f)
```

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2 years agoa11y: Expose GTK_ACCESSIBLE_RELATION_DETAILS to at-spi2
Lukáš Tyrychtr [Wed, 1 Mar 2023 12:53:39 +0000 (13:53 +0100)]
a11y: Expose GTK_ACCESSIBLE_RELATION_DETAILS to at-spi2

This particular relation was not exposed to at-spi2.
Exposing it required adding a missing at-spi2 relation variant, but it was introduced
in at-spi2-core 2.26, so that's likely safe as well.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 1 Mar 2023 12:36:49 +0000 (12:36 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

inspector: Remove debug spew

See merge request GNOME/gtk!5579

2 years agoinspector: Remove debug spew
Matthias Clasen [Wed, 1 Mar 2023 11:32:52 +0000 (06:32 -0500)]
inspector: Remove debug spew

2 years agoa11y: Fix mapping of GTK_ACCESSIBLE_ROLE_PRESENTATION
Lukáš Tyrychtr [Wed, 1 Mar 2023 10:07:09 +0000 (11:07 +0100)]
a11y: Fix mapping of GTK_ACCESSIBLE_ROLE_PRESENTATION

It was, for some reason, mapped to ATSPI_ROLE_SECTION, and GTK_ACCESSIBLE_ROLE_SECTION was mapped to
ATSPI_ROLE_FILLER, so the mapping is reversed. So, reverse it and make it correct.

2 years agoMerge branch 'wip/otte/default-size-docs' into 'main'
Benjamin Otte [Wed, 1 Mar 2023 10:06:34 +0000 (10:06 +0000)]
Merge branch 'wip/otte/default-size-docs' into 'main'

window: Clarify docs for default-size

See merge request GNOME/gtk!5569

2 years agowindow: Clarify docs for default-size
Benjamin Otte [Wed, 1 Mar 2023 10:06:32 +0000 (10:06 +0000)]
window: Clarify docs for default-size

2 years agoMerge branch 'textbuffer-foreground-property' into 'main'
Matthias Clasen [Wed, 1 Mar 2023 02:46:05 +0000 (02:46 +0000)]
Merge branch 'textbuffer-foreground-property' into 'main'

textbuffer: Use correct foreground color property

See merge request GNOME/gtk!5574

2 years agotextbuffer: Use correct foreground color property
Mat [Wed, 1 Mar 2023 02:01:46 +0000 (04:01 +0200)]
textbuffer: Use correct foreground color property

The 'foreground-rgba' property should be used instead of 'foreground',
since the latter is not readable.