Commit Graph

79351 Commits

Author SHA1 Message Date
Matthias Clasen
ca8ba8ce87 text:t Small fixes
gtk_editable_delete_text() takes a half-open interval, and accepts
an end_pos of -1 to mean 'all the way'. The GtkText implementation
was not handling these details correctly.
2024-02-19 15:04:42 -05:00
Matthias Clasen
849e3403cd editable: Improve preconditions
Check that the positions we're given make sense.
2024-02-19 15:04:39 -05:00
Matthias Clasen
02a7a30978 Merge branch 'disable-depth-test' into 'main'
GL, NGL: Disable depth test

Closes #6401

See merge request GNOME/gtk!6917
2024-02-19 19:14:36 +00:00
Luca Bacci
79568d2944 gpu: Disable GL_DEPTH_TEST
The call to enable depth testing was copied from the GL
renderer, but it's not needed.

Fixes #6401
2024-02-19 18:16:35 +01:00
Luca Bacci
ae45be7875 GL renderer: Disable GL_DEPTH_TEST
It was introduced in bbfe4324 to support GtkGLArea. It's not
needed anymore

See #6401
2024-02-19 18:16:35 +01:00
Luca Bacci
73e8b39bc6 WGL: Initialize PIXELFORMATDESCRIPTOR structure 2024-02-19 18:16:35 +01:00
Luca Bacci
72b2938e43 WGL: Request that no depth, stencil and accum buffers be created
Unspecified attributes are not interpreted as "leave this feature out",
rather as "pick a default value". For depth, stencil and accum bits the
defaults may be different than 0. For example, with AMD drivers we get:

 * WGL_DEPTH_BITS_ARB:   32
 * WGL_STENCIL_BITS_ARB: 8
 * WGL_ACCUM_BITS_ARB:   0

Set the attributes to 0 as a hint that depth, stencil and accum buffers
should not be created.

The driver may still create them (matching criteria is "minimum" [1]),
but that's outside of our control (and unlikely to happen).

References:

 [1] - WGL_ARB_pixel_format specification
       https://registry.khronos.org/OpenGL/extensions/ARB/WGL_ARB_pixel_format.txt

See #6401
2024-02-19 18:15:52 +01:00
Matthias Clasen
785aaa8c03 Merge branch 'fix_6454' into 'main'
a11y: Don't mark properties changed for unrealized AT contexts

Closes #6454

See merge request GNOME/gtk!6919
2024-02-19 16:42:36 +00:00
Lukáš Tyrychtr
1d7983da05 a11y: Don't mark properties changed for unrealized AT contexts
That might cause, for example, a description change notification for a widget
which was not seen by the AT previously.

Fixes #6454.
2024-02-19 16:54:11 +01:00
Matthias Clasen
a2b84fc98a Merge branch 'macos_arm' into 'main'
Add macOS CI for Apple Silicon

See merge request GNOME/gtk!6915
2024-02-19 12:29:09 +00:00
René de Hesselle
0d9bbc9d64 ci: Check for SDKROOT environment variable
The SDKROOT variable is _the_ "master switch" to set the target
OS version (much stricter compared to MACOSX_DEPLOYMENT_TARGET alone),
yet it has no impact on the output of 'xcodebuild -showsdks'.

Also rename the script to 'macos', it's not being called 'osx' anymore
since 2016 (Sierra).
2024-02-18 20:40:20 +01:00
René de Hesselle
6fd5e5f61c ci: Add job for Apple Silicon
This marks the beginning of transitioning to the arm64 architecture as
the default. The x86_64 job remains present but is being phased out of
24/7 operations, i.e. the job is now on-demand only.
2024-02-18 20:39:57 +01:00
René de Hesselle
b7285bd688 ci: Update meson and ninja to latest versions 2024-02-18 20:39:50 +01:00
René de Hesselle
938e50c876 ci: Use auditable sources for pkg-config and bison
We need to provide pkg-config and bison to build the introspection
feature. They were previously pre-installed on the runner and are now
provided by dedicated projects for better reproducability
to get away from "works on my machine".
2024-02-18 20:39:31 +01:00
René de Hesselle
e76bfcf2f6 ci: Remove pygobject, pycairo and cmake
They are not required anymore.

Use the system's Python 3 as we no longer need to match the version
with the externally provided wheels for pygobject and pycairo
(courtesy of Inkscape's CI that also runs on that machine).
2024-02-18 20:39:25 +01:00
Asier Sarasua Garmendia
d828f2477e Update Basque translation 2024-02-18 07:47:54 +00:00
Aurimas Černius
4d2bad4c11 Update Lithuanian translation 2024-02-17 21:23:13 +00:00
Yaron Shahrabani
ed14df9738 Update Hebrew translation 2024-02-17 21:06:04 +00:00
Matthias Clasen
d75abc9104 Merge branch 'win32_gtk4_set_icon_list' into 'main'
GdkWin32: implement surface's "icon_list" property setter

See merge request GNOME/gtk!6869
2024-02-17 14:06:10 +00:00
Matthias Clasen
bc83969f6b Merge branch 'macos_ci' into 'main'
Build more things in macOS CI

See merge request GNOME/gtk!6908
2024-02-17 14:05:42 +00:00
René de Hesselle
dff8e34bc9 ci: Refactor job to use flags 2024-02-17 14:31:51 +01:00
René de Hesselle
6d9662cf8d ci: Do not set c++11 for macOS 2024-02-17 14:31:51 +01:00
René de Hesselle
2e6b32083e ci: Enable simd for libjpeg-turbo on macOS 2024-02-17 14:31:51 +01:00
René de Hesselle
b4b42a462a ci: Enable pixman tests for macOS 2024-02-17 14:31:51 +01:00
René de Hesselle
a48a2a3dc9 ci: Build testsuite for macOS
To make it work on macOS, do not add typelibdir to GI_TYPELIB_PATH.
While this change affects all the other jobs as well, it appears to
be of no consequence.
2024-02-17 14:31:51 +01:00
René de Hesselle
9628599620 ci: Build examples for macOS 2024-02-17 14:31:51 +01:00
René de Hesselle
3a4d5ff5c3 ci: Build demos for macOS 2024-02-17 14:31:51 +01:00
Juliano de Souza Camargo
e7fa2571ca Update Brazilian Portuguese translation
(cherry picked from commit 4b0d3d8326)
2024-02-17 12:15:11 +00:00
Matthias Clasen
ad719a9c47 Merge branch 'ink-rect-fixaroo' into 'main'
gsk: Stop padding text node bounds

See merge request GNOME/gtk!6912
2024-02-16 20:30:45 +00:00
Benjamin Otte
0c4ea9bc7c Merge branch 'wip/otte/for-main' into 'main'
gpu: External textures are never mipmap'able

See merge request GNOME/gtk!6911
2024-02-16 20:11:06 +00:00
Matthias Clasen
24de5ffd4e gsk: Stop padding text node bounds
This should not be necessary, provided that the ink extents that
pango provides are accurate.

Update affected tests.
2024-02-16 14:45:20 -05:00
Benjamin Otte
4933bc505f gpu: External textures are never mipmap'able
We were just assuming they were if the format matches.

Fixes crashes in Webkit where the external texture is actually a dmabuf
imported as an EGL image.
2024-02-16 20:16:38 +01:00
Matthias Clasen
ecbee35f93 Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Add keywords to some demos

See merge request GNOME/gtk!6910
2024-02-16 16:37:07 +00:00
Matthias Clasen
5552b5c0ec ci: Add another xfail
This is reported in
https://gitlab.gnome.org/GNOME/gtk/-/issues/6450
2024-02-16 11:13:57 -05:00
Matthias Clasen
2baa899e32 NEWS: Add a new about mesa versions 2024-02-16 10:55:05 -05:00
Matthias Clasen
aaaddd1b47 testsuite: Mark the randomized path tests as flaky
They are, and having them run in ci is counterproductive for now.
2024-02-16 10:24:58 -05:00
Matthias Clasen
d4d4c7e119 gtk-demo: Add keywords to some demos
Folks had trouble finding the 'suggestion entry' demo.
2024-02-16 10:13:55 -05:00
Matthias Clasen
ea33264a87 Merge branch 'wip/abono/meson-dma-buf' into 'main'
meson: Don't make linux/dma-buf.h a requirement for Linux

See merge request GNOME/gtk!6904
2024-02-16 14:40:21 +00:00
Alessandro Bono
4054f33221 meson: Don't fail when linux/dma-buf.h is missing
We just don't define HAVE_DMABUF in this case.
2024-02-16 14:04:46 +01:00
Alessandro Bono
b6767d2eef meson: Decouple linux/dma-buf.h and libdrm checks
Currently dmabuf_dep is found when the following conditions are met:
 - linux/dma-buf.h is present;
 - libdrm is found.

This is because Linux dmabuf support requires drm_fourcc.h which is part
of libdrm.

However, dmabuf_dep is used for two purposes:
 - define HAVE_DMABUF to state dmabuf support;
 - ensure the presence of drm_fourcc.h for gdk and for the
   media-gstreamer module.

Decouple this, unconditionally check for libdrm and require it on
Linux. Then, use libdrm_dep only to state the drm_fourcc.h presence.

Given that now we unconditionally require libdrm on Linux, HAVE_DMABUF
depends only on the linux/dma-buf.h presence.
2024-02-16 14:01:44 +01:00
Matthias Clasen
90d84a2af8 Merge branch 'michaelweghorn/a11y_fix_accessible_at_point' into 'main'
a11y: Return the actual object at the point requested by AT-SPI "GetAccessibleAtPoint"

Closes #6448

See merge request GNOME/gtk!6909
2024-02-15 18:10:53 +00:00
Alessandro Bono
eb34311c2c meson: Sort alphabetically 2024-02-15 18:25:27 +01:00
Michael Weghorn
ea7ddc031c a11y: Fix bounds check for AT-SPI GetAccessibleAtPoint
In `accessible_at_point`, fix the check whether the
given point is inside of the accessible's bounds.

For that to be the case, the point's x coordinate
must be somewhere between the X position of the
accessible's bounds and that position + width.
(Likewise for the y coordinate and the height.)

the previous check would only work correctly
for children located at a relative location
of (0, 0) within the parent.

With this and the previous commit in place,
the (extended) example from issue #6448 now gives
the expected result:
an accessible object in whose bounds include
requested point (50, 50) lies:

    In [19]: acc.queryComponent().getExtents(pyatspi.WINDOW_COORDS)
    Out[19]: [0, 0, 800, 600]
    In [20]: acc.queryComponent().getAccessibleAtPoint(50, 50, pyatspi.WINDOW_COORDS)
    Out[20]: <Atspi.Accessible object at 0x7fae500e9180 (AtspiAccessible at 0x33455b0)>
    In [21]: acc.queryComponent().getAccessibleAtPoint(50, 50, pyatspi.WINDOW_COORDS).queryComponent().getExtents(pyatspi.WINDOW_COORDS)
    Out[21]: [6, 1, 68, 49]

Fixes: #6448
2024-02-15 18:11:55 +01:00
Michael Weghorn
1ff17f1a7e a11y: Ensure accessible queried by GetAccessibleAtPoint is realized
In the the handling of the "GetAccessibleAtPoint" AT-SPI Component
method, make sure that the context of the accessible at the
given point is realized so that a reference can be returned.

Otherwise, the called `gtk_at_spi_context_to_ref` will return
a null ref instead.

The same is already done in the handling for other AT-SPI methods,
(s. "GetRelationSet", "GetChildren", "GetChildAtIndex" in
gtk/a11y/gtkatspicontext.c).

With this in place, an accessible will be returned.
It's not necessarily the one that's really at the requested location,
but that's a different issue that will be addressed in a separate
commit.

With this in place, example from issue #6448 now gives this result
when using Accerciser's IPython console:

    In [16]: acc.queryComponent().getExtents(pyatspi.WINDOW_COORDS)
    Out[16]: [0, 0, 800, 600]
    In [17]: acc.queryComponent().getAccessibleAtPoint(50, 50, pyatspi.WINDOW_COORDS)
    Out[17]: <Atspi.Accessible object at 0x7fae500e8540 (AtspiAccessible at 0x308bf40)>
    In [18]: acc.queryComponent().getAccessibleAtPoint(50, 50, pyatspi.WINDOW_COORDS).queryComponent().getExtents(pyatspi.WINDOW_COORDS)
    Out[18]: [683, 1, 111, 49]

-> an accessible is returned now, but its rectangle starts at
X coordinate 683, so the requested point (50, 50) is not in its
bounding box.

Issue: #6448
2024-02-15 18:11:09 +01:00
Fran Dieguez
8232ab4440 Update Galician translation 2024-02-15 02:26:47 +00:00
Matthias Clasen
bb82e3e1fb Merge branch 'matthiasc/for-main' into 'main'
testsuite: Drop duplicated rounded-rect tests

See merge request GNOME/gtk!6907
2024-02-14 20:21:47 +00:00
Benjamin Otte
1702cdaff6 Merge branch 'wip/otte/for-main' into 'main'
gpu: Render enough of a scaled texture offscreen

Closes #6428 and #6439

See merge request GNOME/gtk!6902
2024-02-14 19:30:58 +00:00
Matthias Clasen
a4583b03a1 testsuite: Drop duplicated rounded-rect tests
No need to test this twice in a row.
2024-02-14 14:12:43 -05:00
Benjamin Otte
b12169776e testsuite: Print random clip rect
That makes it in test log output, which helps when figuring out why a
test failed if the node was not saved/is already deleted.
2024-02-14 20:12:05 +01:00
Benjamin Otte
85f85bbec8 build: Keep artifacts from asan build
We want to be able to investigate occasional failure results, in
particular those with randomness.
2024-02-14 20:12:05 +01:00