Commit Graph

77073 Commits

Author SHA1 Message Date
Matthias Clasen
1066374909 docs: Mention GtkAccessibleRange
In the accessibility docs about custom widgets,
mention GtkAccessibleRange as the best way to
implement custom range widgets.
2023-06-21 22:15:59 -04:00
Matthias Clasen
34a2595dfb Merge branch 'more-a11y-fixes' into 'main'
widget: Don't let abstract role slip through

See merge request GNOME/gtk!6135
2023-06-22 00:47:03 +00:00
Matthias Clasen
76fcd5cf25 Add another a11y test
This one catches the lingering 'widget' role
that only happens when widgets are realized
and rooted.
2023-06-21 19:55:46 -04:00
Matthias Clasen
32e6ed4eca a11y: Use group role for color and font buttons
This is needed since generic does not allow naming.
2023-06-21 19:55:46 -04:00
Matthias Clasen
2983c0be70 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.
2023-06-21 16:18:33 -04:00
Matthias Clasen
e0bf6585de Cosmetics: typo fix 2023-06-21 16:18:33 -04:00
Daniel Boles
c045b0be4c Settings: prop typo => "No description available."
Fix the typo so that we'll actually get documentation for
gtk-entry-select-on-focus.
2023-06-21 20:48:17 +01:00
Matthias Clasen
d8c094944a Merge branch 'more-a11y-fixes' into 'main'
a11y: Don't forget to space-separate computed names

See merge request GNOME/gtk!6134
2023-06-21 18:52:35 +00:00
Matthias Clasen
510bf86268 Add another a11y test
Test that roles come out right for custom widgets.
2023-06-21 14:24:52 -04:00
Matthias Clasen
f3bea027a0 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.
2023-06-21 14:17:52 -04:00
Matthias Clasen
bce3b6f34a aboutdialog: Fix roles one more time
We are more picky about generic, so use group.
2023-06-21 13:47:59 -04:00
Matthias Clasen
01274dfbb9 shortcutswindow: Fix up roles and labels again 2023-06-21 13:18:58 -04:00
Matthias Clasen
533a2cf9ec a11y: Don't forget to space-separate computed names
This was overlooked in one place.
2023-06-21 13:18:07 -04:00
Luca Bacci
43af0ee514 Define this_module with (void) argument
Fixes a compiler warning about K&R (old-style) function definition
2023-06-21 16:18:40 +02:00
Luca Bacci
3912d6aba9 GdkWin32: Fix keyboard state for WinPointer input
The dwKeyStates field of the POINTER_INFO structure
is always set to 0, no matter what. Use GetKeyState
instead.

Forward-port of !4327 to GTK4
2023-06-21 16:18:01 +02:00
Luca Bacci
871685e271 GdkWin32: Use double coordinates for mouse events
Mouse coordinates reported by the system are still integers,
but go sub-pixel when dividing by the window scale factor.
2023-06-21 16:07:55 +02:00
Luca Bacci
5e9daa9728 GdkWin32: Unscaled coordinates in current_root_x, current_root_y
Also modify gdk_win32_surface_do_move_resize_drag() to take
unscaled root coordinates.

Fixes #5877
2023-06-21 16:01:42 +02:00
Luca Bacci
412bc1713a GdkWin32: Keep track of the last cursor position in move / resize contexts
...and avoid doing any work if the position hasn't changed.
2023-06-21 15:31:48 +02:00
Matthias Clasen
5dbc5bbf22 Merge branch 'wip/antoniof/my-mistake' into 'main'
Fix my a mistake

See merge request GNOME/gtk!6130
2023-06-21 12:01:00 +00:00
António Fernandes
79c999cf76 columnviewrowwidget: Reset roles on teardown
This was added to the wrong file in e245883f91

Fix the mistake.
2023-06-21 12:23:39 +01:00
Matthias Clasen
e375bc8838 Merge branch 'wip/antoniof/columnviewrow-accessible-label' into 'main'
columnviewrow: Add accessible-label and -description

Closes #5903

See merge request GNOME/gtk!6129
2023-06-21 10:22:41 +00:00
Matthias Clasen
79505f940b Merge branch 'always-more-a11y-fixes' into 'main'
range: Don't use an abstract role

See merge request GNOME/gtk!6127
2023-06-21 10:07:57 +00:00
Matthias Clasen
0f087deb2a Merge branch 'bump-glib' into 'main'
Bump GLib requirement to 2.76.0

See merge request GNOME/gtk!6128
2023-06-21 10:07:40 +00:00
António Fernandes
e245883f91 columnviewrow: Add accessible-label and -description
Echoing the same changes introduced for GtkListItem by these commits:
* df8d28f5fe
* f2b682dd9c

Resolves https://gitlab.gnome.org/GNOME/gtk/-/issues/5903
2023-06-21 10:27:39 +01:00
Chun-wei Fan
4e9bd13892 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.
2023-06-21 12:29:38 +08:00
Chun-wei Fan
65e9b8fe66 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
2023-06-21 12:27:41 +08:00
Matthias Clasen
e9f870fee6 Make generic really the default role
If nothing else has been set for the instance
or the class, return GTK_ACCESSIBLE_ROLE_GENERIC.
2023-06-20 22:02:37 -04:00
Matthias Clasen
e5e5966934 frame: Use the group role 2023-06-20 21:58:55 -04:00
Matthias Clasen
5c407365e3 ci: Use the current build options for flatpaks
These were changed a while ago.
2023-06-20 20:49:29 -04:00
Matthias Clasen
7e251d81c2 a11y: Fix the stack switcher selection implementation
This was listening for signals on the wrong object.
2023-06-20 20:49:29 -04:00
Matthias Clasen
92d1d52c59 NEWS: updates 2023-06-20 20:49:29 -04:00
Matthias Clasen
ef436e4dce 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.
2023-06-20 20:49:29 -04:00
Benjamin Otte
1a07e336bf Merge branch 'wip/otte/for-vulkan' into 'main'
vulkan: Fix a bunch of validation-layer complaints

See merge request GNOME/gtk!6126
2023-06-20 18:38:41 +00:00
Benjamin Otte
169355f771 vulkan: Rebuild the precompiled shaders
We forgot that with all the changes.
2023-06-20 20:17:06 +02:00
Benjamin Otte
299c6a3d6f 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.
2023-06-20 20:15:12 +02:00
Benjamin Otte
17698bfd2e 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)
2023-06-20 20:15:12 +02:00
Benjamin Otte
377592cb62 vulkan: Use the right flags
Somebody (me) had flipped the 2 flags in commit ba28971a18:

[ 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)
2023-06-20 20:15:12 +02:00
Benjamin Otte
015cebc046 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)
2023-06-20 20:15:12 +02:00
Benjamin Otte
0a5e5023a8 vulkan: Remove unused declaration from shader 2023-06-20 20:15:12 +02:00
Matthias Clasen
a9b8ad6181 Merge branch 'always-more-a11y-fixes' into 'main'
Add a comment about accessible naming

See merge request GNOME/gtk!6125
2023-06-20 17:13:51 +00:00
Matthias Clasen
7331683c01 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.
2023-06-20 12:34:51 -04:00
Matthias Clasen
cca6a66518 a11y: Fix tests
The change to make hidden follow mappedness
means that we now need to arrange for our
test cases to be mapped.
2023-06-20 12:33:02 -04:00
Matthias Clasen
891462e5af Add some more a11y tests
Check that the hidden state is as it should be.
2023-06-20 11:05:22 -04:00
Matthias Clasen
95cd6fe206 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.
2023-06-20 10:58:18 -04:00
Matthias Clasen
63534fd9eb 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.
2023-06-20 10:40:12 -04:00
Matthias Clasen
e836e3380e Add a comment about accessible naming
Put a note on why there are a few differences
to ARIA.
2023-06-20 06:54:59 -04:00
Matthias Clasen
f693beab57 NEWS: Updates 2023-06-20 06:54:40 -04:00
Matthias Clasen
2d2df42a94 Merge branch 'listitem-a11y' into 'main'
listitem: Add accessible-label and -description

See merge request GNOME/gtk!6123
2023-06-20 09:55:58 +00:00
Matthias Clasen
fb0a4fa457 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.
2023-06-19 22:20:05 -04:00
Matthias Clasen
be0003c108 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.
2023-06-19 22:20:05 -04:00