Commit Graph

76932 Commits

Author SHA1 Message Date
Matthias Clasen
407304f2ed inspector: Cosmetic fixes
Align the values on the a11y page to the right.
2023-06-17 19:30:08 -04:00
Matthias Clasen
21fa1d67ce mediacontrols: Add accessible labels 2023-06-17 19:29:53 -04:00
Matthias Clasen
a9f8ec71a4 gtk-demo: Misc a11y improvements 2023-06-17 19:29:53 -04:00
Matthias Clasen
caa8fb4fac gtk-demo: Fix a crash
This was broken in 6b2c088a29.
2023-06-17 17:56:41 -04:00
Matthias Clasen
d59fc3da3c Merge branch 'matthiasc/for-main' into 'main'
colordialogbutton: Sync color

See merge request GNOME/gtk!6107
2023-06-17 21:20:10 +00:00
Matthias Clasen
cbdcf64e4d inspector: Limit the width of a11y page
Ellipsize labels that can contain long
content to prevent a super-wide window.
2023-06-17 16:50:36 -04:00
Matthias Clasen
e251e7583f gtk-demo: Misc a11y fixes
Add some missing labels.
2023-06-17 16:50:36 -04:00
Matthias Clasen
158a3d4f04 inspector: Realize AT ontexts
Otherwise we don't get change notification...
2023-06-17 14:50:01 -04:00
Matthias Clasen
efeff41501 a11y: Set has-popup consistently
Set the has-popup property when a widget
has a context menu.
2023-06-17 12:18:34 -04:00
Matthias Clasen
80c4d4f51d colordialogbutton: Sync color
Make sure the color of the swatch and the button
are initially in sync. As a side-effect, this
ensures that the swatch has its accessible label
computed at the outset.
2023-06-17 11:52:37 -04:00
Matthias Clasen
115f60796f gtk-demo: Cosmetics 2023-06-17 11:52:37 -04:00
Matthias Clasen
7e62bdbf26 Merge branch 'matthiasc/for-main' into 'main'
Don't use "Tab list" as an accessible label

Closes #4839

See merge request GNOME/gtk!6106
2023-06-17 15:44:21 +00:00
Luca Bacci
16bdaa11ce GtkFileChooserWidget: Use GTK_INVALID_LIST_POSITION
...instead of G_MAXUINT
2023-06-17 15:51:22 +02:00
Luca Bacci
46afb4a9a4 GtkFileChooserWidget: Fix condition on visit action
Fixes #5899
2023-06-17 15:50:50 +02:00
Matthias Clasen
775e8dc43d Don't use "Tab list" as an accessible label
It does not add any extra information.

Fixes: #4839
2023-06-17 08:46:41 -04:00
Benjamin Otte
cc603bf657 Merge branch 'dropdown-sections' into 'main'
dropdown: Add section support

See merge request GNOME/gtk!6102
2023-06-17 06:41:30 +00:00
Matthias Clasen
0652e05e0b gtk-demo: Add an example for dropdown sections
Make one of the dropdowns in the Selections
demo have sections.
2023-06-16 21:13:26 -04:00
Matthias Clasen
1347d23658 dropdown: Add section support
Add a header-factory property and pass it through
to the listview in the popup.
2023-06-16 21:13:26 -04:00
Matthias Clasen
3cf349eb6e Merge branch 'fix-c4013' into 'main'
gtkprintoperation-win32.c: Fix build

See merge request GNOME/gtk!6099
2023-06-16 16:38:22 +00:00
Matthias Clasen
53503e3f19 Merge branch 'a11y-computed-name' into 'main'
atcontext: Update name computation

See merge request GNOME/gtk!6088
2023-06-16 16:30:51 +00:00
Daniel Boles
8106dc0f46 reference/gtk/coordinates: Fix typos of “widget’s” 2023-06-15 17:40:08 +01:00
Matthias Clasen
8dec07b6c4 Merge branch 'better_gtkstacksidebar' into 'main'
GtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels

See merge request GNOME/gtk!6100
2023-06-15 12:54:20 +00:00
Lukáš Tyrychtr
29cf15a444 GtkStackSidebar: Explicitly mark the sidebar items as labeled by the labels
That improves the reading of the GtkStackSidebar widget considerably.
Previously, Orca would not read the items at all, now it does.
2023-06-15 14:29:31 +02:00
Chun-wei Fan
abe5eda0f0 gtkprintoperation-win32.c: Fix build
Include the needed headers so that we don't break the build with C4013
warnings, which are treated as errors if msvc_recommended_pragmas.h is
found during build configuration.
2023-06-15 18:50:10 +08:00
Benjamin Otte
fa98e2baf3 Merge branch 'listitem' into 'main'
signallistitemfactory: finish prototype change

See merge request GNOME/gtk!6098
2023-06-15 10:10:55 +00:00
Matthias Clasen
e5eba26eac Merge branch 'no_random_screen_coords' into 'main'
gtkatspicomponent: Don't return unitialized stack data as screen positions of widgets

See merge request GNOME/gtk!6097
2023-06-15 10:02:19 +00:00
Marc-André Lureau
611439aad7 signallistitemfactory: finish prototype change
Complete the API change from commit be1729b316 ("signallistitemfactory:
Update signal prototype").

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-06-15 09:52:34 +02:00
Lukáš Tyrychtr
cb3045bf38 gtkatspicomponent: Don't return unitialized stack data as screen positions of widgets
We can not compute the correct value, but that does not mean we should return
basically random values from an unitialized stack space.

Rather than that behavior, return zeros concistently.
2023-06-15 09:06:30 +02:00
Benjamin Otte
447d1fab62 Merge branch 'wip/otte/vulkan-for-main' into 'main'
vulkan: Move some code

See merge request GNOME/gtk!6096
2023-06-14 06:01:47 +00:00
Benjamin Otte
9836389fde vulkan: Repurpose debug flags for image uploads
Now that we don't use the old environment variables anymore to force
staging buffer/image uploads, we don't need them.

However, we do autodetect the fast path for avoiding a staging buffer
now, and we might want to be able to turn that off for testing.

So add GSK_DEBUG=staging that does exactly that.
2023-06-14 03:34:07 +02:00
Benjamin Otte
7f26f5a160 vulkan: Remove gsk_vulkan_image_new_from_data()
This is unused now that all the code uses map/unmap.

The only thing that map/unmap doesn't do that the old code did, was use
a staging image instead as alternative to a staging buffer for image
uploads.

However, that code is not necessary for anything, so I'm sure we can do
without.
2023-06-14 03:34:07 +02:00
Benjamin Otte
6a009b7182 vulkan: Add upload fastpath
If the memory heap that the GPU uses allows CPU access
(which is the case on basically every integrated GPU, including phones),
we can avoid a staging buffer and write directly into the image memory.

Check for this case and do that automatically.

Unfortunately we need to change the image format we use from
VK_IMAGE_TILING_OPTIMAL to VK_IMAGE_TILING_LINEAR, I haven't found a way
around that yet.
2023-06-14 03:34:07 +02:00
Benjamin Otte
17dd100f43 vulkan: Add gsk_vulkan_memory_can_map()
.. nd use it to assert memory is mappable when mapping it.
2023-06-14 03:34:07 +02:00
Benjamin Otte
49c2c2da1a vulkan: Use map/unmap for fallback images 2023-06-14 03:34:07 +02:00
Benjamin Otte
f88b1cef21 vulkan: Render fallback into vulkan memory
Use the new map/unmap image upload method for Cairo node drawing:
1. map() the memory
2. create an image surface or that memory
3. draw to that image surface
4. success

There's no longer a need for Cairo to allocate image memory.
2023-06-14 03:34:07 +02:00
Benjamin Otte
c27e412ff1 vulkan: Use new upload method for texture uploads
gsk_vulkan_image_new_from_texture() now uses the direct copy via
gdk_texture_downloader_download_into().
2023-06-14 03:34:07 +02:00
Benjamin Otte
0c72f19cb1 vulkan: Add a new way to upload data into images
As an alternative to gsk_vulkan_image_new_from_data() that
takes a given data and creates an image from it, add a 3 step process:
  gsk_vulkan_image_new_for_upload()
  gsk_vulkan_image_map_memory()
  /* put data into memory */
  gsk_vulkan_image_unmap_memory()

The benefit of this approach is that it potentially avoids a copy;
instead of creating a buffer to pass and writing the data into it before
then memcpy()ing it into the image, the data can be written straight
into image memory.

So far, only the staging buffer upload is implemented.

There are also no users, those come in the next commit(s).
2023-06-14 03:34:07 +02:00
Benjamin Otte
cb4e92946b vulkan: Move some code
Add gsk_vulkan_image_new_from_texture() and use it.

Also rewrite the actual code from using Cairo surfaces to using
GdkTextureDownloader.
2023-06-14 03:34:07 +02:00
Benjamin Otte
e7c86f4608 vulkan: Constify upload function 2023-06-14 03:34:07 +02:00
Matthias Clasen
4d026857dc Merge branch 'wip/carlosg/pad-detection' into 'main'
gdk/wayland: Create pad devices on enter

See merge request GNOME/gtk!6094
2023-06-14 00:10:32 +00:00
Carlos Garnacho
c523c68cef gdk: Include pads in GDK_SEAT_CAPABILITY_ALL
The GDK_SEAT_CAPABILITY_TABLET_PAD stood awkwardly out of the
ALL value. Even though it's not a keyboard, its focus has more
resemblance to it, so it should be part of this group together
with keyboards.
2023-06-14 01:42:53 +02:00
Carlos Garnacho
9f4320a4ac gdk/wayland: Create pad devices on enter
We were creating the pad device on wp_tablet_pad.done, but
at that time we do not know what tablet it is associated with,
thus we cannot get appropriate vid/pid/name properties for it.

To get that, we need to wait for the pad to enter a surface,
at that time we do know what tablet it is associated with, so
we can get better information about the device.

There are pads that may plausibly "change" tablet between
one .enter event and the next (e.g. Wacom Express Key Remote),
but this situation is highly unlikely. The pad devices created
are thus persistent until that situation happens.
2023-06-14 01:42:53 +02:00
Matthias Clasen
8f6cc19fdb Merge branch 'mcatanzaro/gtk-show-uri-deprecated-for' into 'main'
Change recommended replacement for gtk_show_uri()

See merge request GNOME/gtk!6093
2023-06-13 18:28:32 +00:00
Matthias Clasen
9831632fbd a11y docs: Some updates
Clarify what UI properties go into the name computation,
and mention the inspector tools for accessiblity.
2023-06-13 14:12:16 -04:00
Michael Catanzaro
bef1c69254 Change recommended replacement for gtk_show_uri()
Problem is GtkFileLauncher is unable to handle all the types of URIs
that are supported by gtk_show_uri(), e.g. help: URIs. GtkUriLauncher
avoids this problem.

Another problem is that GtkUriLauncher is just generally a better choice
for launching URIs, since you don't have to create a GFile in order to
use it. Porting code is slightly simpler.

The documentation still mentions both GtkFileLauncher and GtkUriLauncher
as options, but most people will use whatever the compiler recommends
when it prints the deprecation warning.
2023-06-13 13:03:04 -05:00
Carlos Garnacho
f381cdef5b Merge branch 'window-clear-resize_cursor-on' into 'main'
window: Clear resize_cursor on leave notify events

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

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

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

One could also say that if the pointer leaves the window surface, it's
trivially not over any window edge.
2023-06-13 12:01:29 +02:00
Matthias Clasen
e5f570045e Merge branch 'matthiasc/for-main' into 'main'
Matthiasc/for main

See merge request GNOME/gtk!6091
2023-06-12 19:18:49 +00:00
Matthias Clasen
4bee0e2454 ci: Collect artifacts from the asan build 2023-06-12 14:54:28 -04:00
Matthias Clasen
fb6ce30fb4 listitemmanager: Quiet a compiler warning 2023-06-12 14:54:21 -04:00