gtk4.git
2 years agovulkan: Generate vertex array headers from shaders
Benjamin Otte [Tue, 27 Jun 2023 04:45:31 +0000 (06:45 +0200)]
vulkan: Generate vertex array headers from shaders

The script is pretty dumb but it does its job.

2 years agovulkan: Rename crossfade => cross-fade
Benjamin Otte [Tue, 27 Jun 2023 04:28:52 +0000 (06:28 +0200)]
vulkan: Rename crossfade => cross-fade

Preparation for the future.

2 years agovulkan: Rename blendmode to blend-mode
Benjamin Otte [Tue, 27 Jun 2023 04:05:33 +0000 (06:05 +0200)]
vulkan: Rename blendmode to blend-mode

Preparation for future changes, nothing to see here.

2 years agoMerge branch 'wip/otte/vulkan-for-main' into 'main'
Benjamin Otte [Mon, 26 Jun 2023 18:52:48 +0000 (18:52 +0000)]
Merge branch 'wip/otte/vulkan-for-main' into 'main'

vulkan: Add a pipeline cache

See merge request GNOME/gtk!6148

2 years agovulkan: Add a pipeline cache
Benjamin Otte [Mon, 26 Jun 2023 03:10:16 +0000 (05:10 +0200)]
vulkan: Add a pipeline cache

Make the display handle the cache, because we only need one.

We store the cache in
  $CACHE_DIR/gtk-4.0/vulkan-pipeline-cache/$UUID.$VERSION
so we regenerate caches for each different device (different UUID) and
each different driver version.

We also keep track of the etag of the cache file, so if 2 different
applications update the cache, we can detect that.
Vulkan allows merging caches, so the 2nd app reloads the new cache file
and merges it into its cache before saving.

2 years agoMerge branch 'main' into 'main'
Matthias Clasen [Mon, 26 Jun 2023 18:18:14 +0000 (18:18 +0000)]
Merge branch 'main' into 'main'

Add settable search match mode in dropdown

See merge request GNOME/gtk!6146

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 26 Jun 2023 15:38:32 +0000 (15:38 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

buildertool: Make render an alias for screenshot

See merge request GNOME/gtk!6147

2 years agobuildertool: Make render an alias for screenshot
Matthias Clasen [Mon, 26 Jun 2023 14:57:11 +0000 (10:57 -0400)]
buildertool: Make render an alias for screenshot

Its a more neutral name and will align better with
other tools.

2 years agoAdd settable search match mode in dropdown
al_SeveR [Mon, 26 Jun 2023 14:14:39 +0000 (14:14 +0000)]
Add settable search match mode in dropdown

2 years agoUpdate Brazilian Portuguese translation
Leônidas Araújo [Mon, 26 Jun 2023 13:08:44 +0000 (13:08 +0000)]
Update Brazilian Portuguese translation

(cherry picked from commit 98a2aae5ac273f5c37a3edbc2d7bbad62ecb62f7)

2 years agoGtkText: Link to descendents/`monospace` CSS nodes
Daniel Boles [Mon, 26 Jun 2023 12:04:43 +0000 (13:04 +0100)]
GtkText: Link to descendents/`monospace` CSS nodes

Change the descendent classes from `monospace`-without-links to links.
Add `monospace` around the names of CSS nodes and classes for clarity.

2 years agowidget-factory: Set a11y labels on scale buttons
Matthias Clasen [Mon, 26 Jun 2023 02:28:23 +0000 (22:28 -0400)]
widget-factory: Set a11y labels on scale buttons

Just to check that this works now.

2 years agoUpdate Georgian translation
Ekaterine Papava [Sun, 25 Jun 2023 13:39:03 +0000 (13:39 +0000)]
Update Georgian translation

2 years agoMerge branch 'gtkstack_fix_pages_param_check' into 'main'
Matthias Clasen [Sat, 24 Jun 2023 12:08:18 +0000 (12:08 +0000)]
Merge branch 'gtkstack_fix_pages_param_check' into 'main'

stack: fix pages list bounds check

See merge request GNOME/gtk!6141

2 years agostack: fix pages list bounds check
G.Willems [Sat, 24 Jun 2023 01:05:37 +0000 (03:05 +0200)]
stack: fix pages list bounds check

Fix integer underflow when children->len is 0.
Add missing bounds check in select_item()

2 years agoMerge branch 'ebassi/builder-docs' into 'main'
Matthias Clasen [Fri, 23 Jun 2023 23:45:05 +0000 (23:45 +0000)]
Merge branch 'ebassi/builder-docs' into 'main'

docs: Clean up section on UI definitions

See merge request GNOME/gtk!6139

2 years agoMerge branch 'wip/chergert/gdatetime-from-gtkbuilder' into 'main'
Matthias Clasen [Fri, 23 Jun 2023 23:43:28 +0000 (23:43 +0000)]
Merge branch 'wip/chergert/gdatetime-from-gtkbuilder' into 'main'

builder: add support for parsing GDateTime

See merge request GNOME/gtk!6140

2 years agobuilder: add support for parsing GDateTime
Christian Hergert [Fri, 23 Jun 2023 21:11:37 +0000 (14:11 -0700)]
builder: add support for parsing GDateTime

This will parse a <property/> containing the ISO 8601 format for a date
for use in GDateTime properties. For example:

  <property name="sampled-at">2023-06-23T00:00:00.00</property>

2 years agodocs: Clean up section on UI definitions
Emmanuele Bassi [Fri, 23 Jun 2023 13:16:44 +0000 (14:16 +0100)]
docs: Clean up section on UI definitions

The current documentation is narrative, but it lacks examples and proper
formatting, which makes it harder to read and visually scan.

Let's split off paragraphs and sections, so they can be easily linkend,
and add a few examples for each description.

2 years agodocs/ref/gtk/running: Mention GDK_DEBUG=no-portals
Daniel Boles [Fri, 23 Jun 2023 13:24:47 +0000 (14:24 +0100)]
docs/ref/gtk/running: Mention GDK_DEBUG=no-portals

It was omitted from !5336

2 years agoFileDialog: Fix typos of "inital" to "initial"
Daniel Boles [Fri, 23 Jun 2023 12:50:53 +0000 (13:50 +0100)]
FileDialog: Fix typos of "inital" to "initial"

2 years agoMerge branch 'dboles/FileDialog_initial-folder_from_initial-file' into 'main'
Matthias Clasen [Fri, 23 Jun 2023 01:14:15 +0000 (01:14 +0000)]
Merge branch 'dboles/FileDialog_initial-folder_from_initial-file' into 'main'

Fix FileDialog: initial-file doesnʼt set initial-folder

See merge request GNOME/gtk!6137

2 years agoMerge branch 'always-more-a11y-fixes' into 'main'
Matthias Clasen [Fri, 23 Jun 2023 01:06:57 +0000 (01:06 +0000)]
Merge branch 'always-more-a11y-fixes' into 'main'

scalebutton: Use the group role

See merge request GNOME/gtk!6138

2 years agoa11y: Extend the nested button hack to volume buttons
Matthias Clasen [Thu, 22 Jun 2023 22:37:10 +0000 (18:37 -0400)]
a11y: Extend the nested button hack to volume buttons

2 years agoscalebutton: Use the group role
Matthias Clasen [Thu, 22 Jun 2023 22:36:39 +0000 (18:36 -0400)]
scalebutton: Use the group role

This is needed for accessible labels to work.

2 years agoFileDialog: initial-file didnʼt set initial-folder
Daniel Boles [Thu, 22 Jun 2023 21:33:14 +0000 (22:33 +0100)]
FileDialog: initial-file didnʼt set initial-folder

We always set :initial-folder to NULL and then notified about that,
instead of setting it to the folder of the :initial-file as we say.

2 years agoUpdate Catalan translation
Jordi Mas [Thu, 22 Jun 2023 19:00:28 +0000 (21:00 +0200)]
Update Catalan translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 22 Jun 2023 02:40:08 +0000 (02:40 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

docs: Mention GtkAccessibleRange

See merge request GNOME/gtk!6136

2 years agodocs: Mention GtkAccessibleRange
Matthias Clasen [Thu, 22 Jun 2023 01:35:27 +0000 (21:35 -0400)]
docs: Mention GtkAccessibleRange

In the accessibility docs about custom widgets,
mention GtkAccessibleRange as the best way to
implement custom range widgets.

2 years agoMerge branch 'more-a11y-fixes' into 'main'
Matthias Clasen [Thu, 22 Jun 2023 00:47:03 +0000 (00:47 +0000)]
Merge branch 'more-a11y-fixes' into 'main'

widget: Don't let abstract role slip through

See merge request GNOME/gtk!6135

2 years agoAdd another a11y test
Matthias Clasen [Wed, 21 Jun 2023 20:06:39 +0000 (16:06 -0400)]
Add another a11y test

This one catches the lingering 'widget' role
that only happens when widgets are realized
and rooted.

2 years agoa11y: Use group role for color and font buttons
Matthias Clasen [Wed, 21 Jun 2023 20:16:11 +0000 (16:16 -0400)]
a11y: Use group role for color and font buttons

This is needed since generic does not allow naming.

2 years agowidget: Don't let abstract role slip through
Matthias Clasen [Wed, 21 Jun 2023 20:05:29 +0000 (16:05 -0400)]
widget: Don't let abstract role slip through

When there isn't an accessible role set on the
instance or in class_init, we want to default
to 'generic'. There was one place where we
failed to do so.

2 years agoCosmetics: typo fix
Matthias Clasen [Wed, 21 Jun 2023 19:39:28 +0000 (15:39 -0400)]
Cosmetics: typo fix

2 years agoSettings: prop typo => "No description available."
Daniel Boles [Wed, 21 Jun 2023 19:48:17 +0000 (20:48 +0100)]
Settings: prop typo => "No description available."

Fix the typo so that we'll actually get documentation for
gtk-entry-select-on-focus.

2 years agoMerge branch 'more-a11y-fixes' into 'main'
Matthias Clasen [Wed, 21 Jun 2023 18:52:35 +0000 (18:52 +0000)]
Merge branch 'more-a11y-fixes' into 'main'

a11y: Don't forget to space-separate computed names

See merge request GNOME/gtk!6134

2 years agoAdd another a11y test
Matthias Clasen [Wed, 21 Jun 2023 18:21:37 +0000 (14:21 -0400)]
Add another a11y test

Test that roles come out right for custom widgets.

2 years agoDropdown: Explicitly set a role
Matthias Clasen [Wed, 21 Jun 2023 18:17:52 +0000 (14:17 -0400)]
Dropdown: Explicitly set a role

For some reason I haven't been able to track down,
the listitemwidget comes up wit the abstract widget
role otherwise.

2 years agoaboutdialog: Fix roles one more time
Matthias Clasen [Wed, 21 Jun 2023 17:47:59 +0000 (13:47 -0400)]
aboutdialog: Fix roles one more time

We are more picky about generic, so use group.

2 years agoshortcutswindow: Fix up roles and labels again
Matthias Clasen [Wed, 21 Jun 2023 17:18:58 +0000 (13:18 -0400)]
shortcutswindow: Fix up roles and labels again

2 years agoa11y: Don't forget to space-separate computed names
Matthias Clasen [Wed, 21 Jun 2023 17:18:07 +0000 (13:18 -0400)]
a11y: Don't forget to space-separate computed names

This was overlooked in one place.

2 years agoMerge branch 'wip/antoniof/my-mistake' into 'main'
Matthias Clasen [Wed, 21 Jun 2023 12:01:00 +0000 (12:01 +0000)]
Merge branch 'wip/antoniof/my-mistake' into 'main'

Fix my a mistake

See merge request GNOME/gtk!6130

2 years agocolumnviewrowwidget: Reset roles on teardown
António Fernandes [Wed, 21 Jun 2023 11:23:39 +0000 (12:23 +0100)]
columnviewrowwidget: Reset roles on teardown

This was added to the wrong file in e245883f911bb2f9d1df6beaeb7edd332f797990

Fix the mistake.

2 years agoMerge branch 'wip/antoniof/columnviewrow-accessible-label' into 'main'
Matthias Clasen [Wed, 21 Jun 2023 10:22:41 +0000 (10:22 +0000)]
Merge branch 'wip/antoniof/columnviewrow-accessible-label' into 'main'

columnviewrow: Add accessible-label and -description

Closes #5903

See merge request GNOME/gtk!6129

2 years agoMerge branch 'always-more-a11y-fixes' into 'main'
Matthias Clasen [Wed, 21 Jun 2023 10:07:57 +0000 (10:07 +0000)]
Merge branch 'always-more-a11y-fixes' into 'main'

range: Don't use an abstract role

See merge request GNOME/gtk!6127

2 years agoMerge branch 'bump-glib' into 'main'
Matthias Clasen [Wed, 21 Jun 2023 10:07:40 +0000 (10:07 +0000)]
Merge branch 'bump-glib' into 'main'

Bump GLib requirement to 2.76.0

See merge request GNOME/gtk!6128

2 years agocolumnviewrow: Add accessible-label and -description
António Fernandes [Wed, 21 Jun 2023 09:24:54 +0000 (10:24 +0100)]
columnviewrow: Add accessible-label and -description

Echoing the same changes introduced for GtkListItem by these commits:
df8d28f5fead251b725cf4cfe7d6da7cc429eb21
f2b682dd9cd87b3b4cd2f1f662c5a06624b294a2

Resolves https://gitlab.gnome.org/GNOME/gtk/-/issues/5903

2 years agoVisual Studio: Remove workarounds for <= glib-2.74.x
Chun-wei Fan [Wed, 21 Jun 2023 04:24:40 +0000 (12:24 +0800)]
Visual Studio: Remove workarounds for <= glib-2.74.x

We now need glib-2.76.0 or later, which removes our needs for the workarounds
that we need to build the media backends against GLib-2.74.x or earlier, so
clean up things a bit.

2 years agoglib.wrap: Use 2.76.0
Chun-wei Fan [Wed, 21 Jun 2023 04:00:42 +0000 (12:00 +0800)]
glib.wrap: Use 2.76.0

We are now using APIs that were introduced in 2.75.x, so let's use glib-2.76.0
here for our glib subproject.

Update the build and gobject-introspection items accordingly

2 years agoMake generic really the default role
Matthias Clasen [Wed, 21 Jun 2023 02:02:37 +0000 (22:02 -0400)]
Make generic really the default role

If nothing else has been set for the instance
or the class, return GTK_ACCESSIBLE_ROLE_GENERIC.

2 years agoframe: Use the group role
Matthias Clasen [Wed, 21 Jun 2023 01:57:50 +0000 (21:57 -0400)]
frame: Use the group role

2 years agoci: Use the current build options for flatpaks
Matthias Clasen [Wed, 21 Jun 2023 00:48:44 +0000 (20:48 -0400)]
ci: Use the current build options for flatpaks

These were changed a while ago.

2 years agoa11y: Fix the stack switcher selection implementation
Matthias Clasen [Wed, 21 Jun 2023 00:48:01 +0000 (20:48 -0400)]
a11y: Fix the stack switcher selection implementation

This was listening for signals on the wrong object.

2 years agoNEWS: updates
Matthias Clasen [Tue, 20 Jun 2023 18:26:22 +0000 (14:26 -0400)]
NEWS: updates

2 years agorange: Don't use an abstract role
Matthias Clasen [Tue, 20 Jun 2023 17:46:44 +0000 (13:46 -0400)]
range: Don't use an abstract role

This snuck through, because the range wasn't
setting any role at all, it just ends up using
the initial, abstract role of widget.

2 years agoMerge branch 'wip/otte/for-vulkan' into 'main'
Benjamin Otte [Tue, 20 Jun 2023 18:38:41 +0000 (18:38 +0000)]
Merge branch 'wip/otte/for-vulkan' into 'main'

vulkan: Fix a bunch of validation-layer complaints

See merge request GNOME/gtk!6126

2 years agovulkan: Rebuild the precompiled shaders
Benjamin Otte [Tue, 20 Jun 2023 18:16:07 +0000 (20:16 +0200)]
vulkan: Rebuild the precompiled shaders

We forgot that with all the changes.

2 years agovulkan: Take offscreen fromat from context
Benjamin Otte [Tue, 20 Jun 2023 14:35:55 +0000 (16:35 +0200)]
vulkan: Take offscreen fromat from context

We want to create offscreens in compatible formats, and in particular we
want to ideally use the same format as rendering would use.

2 years agovulkan: Use 3 descriptor sets, not 3 bindings
Benjamin Otte [Tue, 20 Jun 2023 13:39:29 +0000 (15:39 +0200)]
vulkan: Use 3 descriptor sets, not 3 bindings

It turns out variable length is only supported for the last binding in
a set, not for every binding.
So we need to create one set for each of our arrays.

[ VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-03004 ] Object 0: handle = 0x33a9f10, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xd3f353a | vkCreateDescriptorSetLayout(): pBindings[0] has VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT but 0 is the largest value of all the bindings. The Vulkan spec states: If an element of pBindingFlags includes VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT, then all other elements of VkDescriptorSetLayoutCreateInfo::pBindings must have a smaller value of binding (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-03004)

2 years agovulkan: Use the right flags
Benjamin Otte [Tue, 20 Jun 2023 13:32:23 +0000 (15:32 +0200)]
vulkan: Use the right flags

Somebody (me) had flipped the 2 flags in commit ba28971a183:

[ VUID-vkCmdCopyBufferToImage-srcBuffer-00174 ] Object 0: handle = 0x3cfaac0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x430000000043, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xe1b276a1 | Invalid usage flag for VkBuffer 0x430000000043[] used by vkCmdCopyBufferToImage. In this case, VkBuffer should have VK_BUFFER_USAGE_TRANSFER_SRC_BIT set during creation. The Vulkan spec states: srcBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdCopyBufferToImage-srcBuffer-00174)

2 years agovulkan: Set descriptorBindingStorageBufferUpdateAfterBind
Benjamin Otte [Tue, 20 Jun 2023 13:29:45 +0000 (15:29 +0200)]
vulkan: Set descriptorBindingStorageBufferUpdateAfterBind

It's necessary now that we use storage buffers for gradients:

[ VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008 ] Object 0: handle = 0x1e72d70, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x943cc552 | vkCreateDescriptorSetLayout(): pBindings[0] can't have VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT for VK_DESCRIPTOR_TYPE_STORAGE_BUFFER since descriptorBindingStorageBufferUpdateAfterBind is not enabled. The Vulkan spec states: If VkPhysicalDeviceDescriptorIndexingFeatures::descriptorBindingStorageBufferUpdateAfterBind is not enabled, all bindings with descriptor type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER must not use VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008)

2 years agovulkan: Remove unused declaration from shader
Benjamin Otte [Mon, 19 Jun 2023 17:29:13 +0000 (19:29 +0200)]
vulkan: Remove unused declaration from shader

2 years agoMerge branch 'always-more-a11y-fixes' into 'main'
Matthias Clasen [Tue, 20 Jun 2023 17:13:51 +0000 (17:13 +0000)]
Merge branch 'always-more-a11y-fixes' into 'main'

Add a comment about accessible naming

See merge request GNOME/gtk!6125

2 years agoa11y: Improve name computation
Matthias Clasen [Tue, 20 Jun 2023 16:34:01 +0000 (12:34 -0400)]
a11y: Improve name computation

We only want to settle on subtree content
if it provides nonempty text. Otherwise,
the tooltip should still win.

This was clarified in the current Editor Draft
of the accessible name computation spec.

2 years agoa11y: Fix tests
Matthias Clasen [Tue, 20 Jun 2023 16:33:02 +0000 (12:33 -0400)]
a11y: Fix tests

The change to make hidden follow mappedness
means that we now need to arrange for our
test cases to be mapped.

2 years agoAdd some more a11y tests
Matthias Clasen [Tue, 20 Jun 2023 15:05:22 +0000 (11:05 -0400)]
Add some more a11y tests

Check that the hidden state is as it should be.

2 years agomenubutton: Remove all the labelled-by relations
Matthias Clasen [Tue, 20 Jun 2023 14:56:41 +0000 (10:56 -0400)]
menubutton: Remove all the labelled-by relations

This was a bit much, and should not be necessary anymore,
now that our name computation handles nested buttons.

2 years agowidget: Fix accessible hidden state
Matthias Clasen [Tue, 20 Jun 2023 14:40:12 +0000 (10:40 -0400)]
widget: Fix accessible hidden state

Make this track the widgets' mapped state
instead of visible. Also, set hidden to FALSE
initially, since the accessible name computation
checks for hidden==FALSE.

2 years agoAdd a comment about accessible naming
Matthias Clasen [Tue, 20 Jun 2023 10:53:34 +0000 (06:53 -0400)]
Add a comment about accessible naming

Put a note on why there are a few differences
to ARIA.

2 years agoNEWS: Updates
Matthias Clasen [Tue, 20 Jun 2023 01:43:18 +0000 (21:43 -0400)]
NEWS: Updates

2 years agoMerge branch 'listitem-a11y' into 'main'
Matthias Clasen [Tue, 20 Jun 2023 09:55:58 +0000 (09:55 +0000)]
Merge branch 'listitem-a11y' into 'main'

listitem: Add accessible-label and -description

See merge request GNOME/gtk!6123

2 years agoa11y: Stop recommending tab list labels
Matthias Clasen [Tue, 20 Jun 2023 02:14:23 +0000 (22:14 -0400)]
a11y: Stop recommending tab list labels

There is no good way to set an explicit label
on the tab list of a GtkNotebook, so showing
a blue overlay on it is annoying more than
helpful.

This is another little deviation from the ARIA
authoring guidelines.

2 years agoa11y: Stop recommending against listitem labels
Matthias Clasen [Tue, 20 Jun 2023 02:12:05 +0000 (22:12 -0400)]
a11y: Stop recommending against listitem labels

Due to the way listviews are set up, there is not
much of an alternative to setting labels on the
listitems, so don't recommend against doing it.

This is a little deviation from the ARIA authoring
guidelines.

2 years agogizmo: Stop using abstract roles
Matthias Clasen [Tue, 20 Jun 2023 02:11:14 +0000 (22:11 -0400)]
gizmo: Stop using abstract roles

This was overlooked.

2 years agogtk-demo: Some a11y improvements
Matthias Clasen [Tue, 20 Jun 2023 02:10:45 +0000 (22:10 -0400)]
gtk-demo: Some a11y improvements

Add missing labels to the applauncher demo
and the clocks demo.

2 years agolistitemwidget: Clean up in teardown
Matthias Clasen [Tue, 20 Jun 2023 01:50:45 +0000 (21:50 -0400)]
listitemwidget: Clean up in teardown

2 years agoMerge branch 'a11y-work' into 'main'
Matthias Clasen [Tue, 20 Jun 2023 01:23:13 +0000 (01:23 +0000)]
Merge branch 'a11y-work' into 'main'

A11y role changes

See merge request GNOME/gtk!6101

2 years agogtk-demo: Improve a11y for applauncher
Matthias Clasen [Tue, 20 Jun 2023 01:06:50 +0000 (21:06 -0400)]
gtk-demo: Improve a11y for applauncher

Use the new listitem properties to make
orca read the selected item in the applauncher
demo.

2 years agolistitem: Add accessible-label and -description
Matthias Clasen [Tue, 20 Jun 2023 01:05:51 +0000 (21:05 -0400)]
listitem: Add accessible-label and -description

Add properties to GtkListItem to set the accessible
label and description of the listitem widget. This
is important, since orca will read these if the
listitem widget ends up with the focus.

2 years agoa11y: Add the ARIA ontology
Matthias Clasen [Fri, 16 Jun 2023 22:40:19 +0000 (18:40 -0400)]
a11y: Add the ARIA ontology

Add a helper function to find out which roles are
superclasses of each other.

This isn't used yet (apart from the existing use for
ranges), but it might be in the future.

2 years agoDocs: update
Matthias Clasen [Fri, 16 Jun 2023 23:04:06 +0000 (19:04 -0400)]
Docs: update

2 years agoa11y: Treat widget and window as abstract roles
Matthias Clasen [Fri, 16 Jun 2023 19:42:42 +0000 (15:42 -0400)]
a11y: Treat widget and window as abstract roles

We no longer use these, so we can enforce
that they are abstract.

2 years agowindow: Use application as accessible role
Matthias Clasen [Fri, 16 Jun 2023 23:03:49 +0000 (19:03 -0400)]
window: Use application as accessible role

ARIA deems the window role to be abstract,
so lets use the application role instead.

Update affected tests.

2 years agoAdd the application role
Matthias Clasen [Fri, 16 Jun 2023 19:56:39 +0000 (15:56 -0400)]
Add the application role

ARIA has this role. We left it out initially, but
it is an ok fit for toplevel windows, and better
than window, since that is meant to be abstract.

2 years agoUse generic as default accessible role
Matthias Clasen [Fri, 16 Jun 2023 19:26:03 +0000 (15:26 -0400)]
Use generic as default accessible role

The ARIA specs want widget to be abstract role.
We should respect that and use 'generic' instead.

2 years agowidget: Warn for abstract accessible roles
Matthias Clasen [Fri, 16 Jun 2023 19:14:57 +0000 (15:14 -0400)]
widget: Warn for abstract accessible roles

These should not be used for widgets, so warn if
they are passed to gtk_widget_set_accessible_role()
or gtk_widget_class_set_accessible_role().

2 years agoAdd gtk_accessible_role_is_abstract
Matthias Clasen [Fri, 16 Jun 2023 18:55:06 +0000 (14:55 -0400)]
Add gtk_accessible_role_is_abstract

Move this code from the a11y overlay in the inspector.
It will be used more widely, going forward.

2 years agoAdd another a11y test
Matthias Clasen [Mon, 19 Jun 2023 16:35:36 +0000 (12:35 -0400)]
Add another a11y test

2 years agoMerge branch 'a11y-defeat' into 'main'
Matthias Clasen [Mon, 19 Jun 2023 21:06:13 +0000 (21:06 +0000)]
Merge branch 'a11y-defeat' into 'main'

Give up on warning ATs into submission

See merge request GNOME/gtk!6121

2 years agoMerge branch 'fix-issue-5899' into 'main'
Matthias Clasen [Mon, 19 Jun 2023 20:52:15 +0000 (20:52 +0000)]
Merge branch 'fix-issue-5899' into 'main'

GtkFileChooserWidget: Fix condition on visit action

Closes #5899

See merge request GNOME/gtk!6103

2 years agoa11y: Remove the unrealized warning
Matthias Clasen [Mon, 19 Jun 2023 20:41:39 +0000 (16:41 -0400)]
a11y: Remove the unrealized warning

This warning triggers quite a lot when opening
a window while orca is running, which clearly
shows that what it warns about happens in
practice. But fixing it is reentry hell, and
not a battle I'm up for today.

2 years agoGive up on warning ATs into submission
Matthias Clasen [Mon, 19 Jun 2023 20:41:20 +0000 (16:41 -0400)]
Give up on warning ATs into submission

Its been more than a decade since Wayland
has not supported screen coordinates. Clearly
spamming every apps stderr with warnings is
never going to make ATs stop asking for screen
coordinates.

Just give up. Go home

2 years agoMerge branch 'unaligned-access' into 'main'
Benjamin Otte [Mon, 19 Jun 2023 20:26:18 +0000 (20:26 +0000)]
Merge branch 'unaligned-access' into 'main'

gtk: Align key_size up to key_align

Closes #5907

See merge request GNOME/gtk!6120

2 years agogtk: Align key_size up to key_align
Matt Turner [Mon, 19 Jun 2023 19:50:04 +0000 (15:50 -0400)]
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
2 years agogtk: Pass G_ALIGNOF (...) to gtk_sort_keys_new
Matt Turner [Mon, 19 Jun 2023 19:47:17 +0000 (15:47 -0400)]
gtk: Pass G_ALIGNOF (...) to gtk_sort_keys_new

The sizeof and G_ALIGNOF are often, but not always, identical.

2 years agoWidget: Also mention get_height in get_alloc depʼn
Daniel Boles [Mon, 19 Jun 2023 19:28:01 +0000 (20:28 +0100)]
Widget: Also mention get_height in get_alloc depʼn

The deprecation notice seems to have been copied from
get_allocated_width(), but for get_allocation() height is also relevant.

2 years agoMerge branch 'redo-a11y-name-computation' into 'main'
Matthias Clasen [Mon, 19 Jun 2023 17:49:22 +0000 (17:49 +0000)]
Merge branch 'redo-a11y-name-computation' into 'main'

Reimplement a11y name computation

See merge request GNOME/gtk!6119

2 years agoAdd more name computation tests
Matthias Clasen [Mon, 19 Jun 2023 15:25:09 +0000 (11:25 -0400)]
Add more name computation tests

Test the fallback for range values.

This was not working at all before
the previous commit.

2 years agoa11y: Fix name computation for ranges
Matthias Clasen [Mon, 19 Jun 2023 15:42:10 +0000 (11:42 -0400)]
a11y: Fix name computation for ranges

There were two problems here:

First, the code was checking for the abstract
range role, instead of its subclasses.

Second, the code was calling a string value
getter on a number value. Oops.

2 years agoAdd tests for accessible name computation
Matthias Clasen [Mon, 19 Jun 2023 03:05:21 +0000 (23:05 -0400)]
Add tests for accessible name computation