Commit Graph

79625 Commits

Author SHA1 Message Date
Matthias Clasen
eeee3151b6 Implement GtkAccessibleText in GtkInscription 2024-02-20 13:53:08 -05:00
Matthias Clasen
0cd077e80f Implement GtkAccessibleText for GtkLabel 2024-02-20 13:53:08 -05:00
Matthias Clasen
0e9b098f4e a11y: Add signals to GtkTestAtContext
Add signals, so we can check that text caret/selection/content
updates make it to the backend as expected.
2024-02-20 13:53:08 -05:00
Emmanuele Bassi
40b5002338 a11y: Emit the ATSPI text change notification events
Emit the signals on the D-Bus connection object, if one is available.
2024-02-20 13:53:08 -05:00
Emmanuele Bassi
28fd3fbf50 a11y: Emit the ATSPI caret and selection events
Provide an ATSPI implementation for the update_caret_position() and
update_selection_bound() virtual functions.
2024-02-20 13:53:08 -05:00
Matthias Clasen
10c782b106 a11y: Translate GtkAccessibleText to AT-SPI
Handle GtkAccessibleText in our translation layer, as far as
possible.
2024-02-20 13:53:08 -05:00
Matthias Clasen
5dd1803288 Merge branch 'x11_coords-relative-to-root' into 'main'
x11: Read window position relative to root window rather than parent

See merge request GNOME/gtk!6918
2024-02-20 18:18:41 +00:00
Matthias Clasen
7e9f2e2311 Merge branch 'editable-check-text' into 'main'
Add additional check for NULL text in GtkEditable

See merge request GNOME/gtk!6174
2024-02-20 18:15:42 +00:00
Matthias Clasen
610a5d6c0d a11y: Use the right enumeration type
The GtkAccessibleTextGranularity enum matches the corresponding ATSPI
one.
2024-02-20 12:19:56 -05:00
Matthias Clasen
5453628491 Don't forget to serialize overlines 2024-02-20 12:19:56 -05:00
Matthias Clasen
6e0596e122 a11y: Hoist Pango integration API up into GTK
We are going to use it in the AccessibleText implementations, so there's
no need to have it under a11y.

Also, change the apis from taking a GVariantBuilder to just return
plain arrays.
2024-02-20 12:19:56 -05:00
Matthias Clasen
0ca8d74842 a11y: Add GtkAccessibleText interface
The AccessibleText interface is meant to be implemented by widgets and
other accessible objects that expose selectable, navigatable, or rich
text to assistive technologies.

This kind of text is not covered by the plain accessible name and
description, as it contains things like a caret, or text attributes.

This commit adds a stub GtkAccessibleText with its basic virtual
functions; the interface will be implemented by widgets like GtkLabel,
GtkInscription, GtkText, and GtkTextView. A further commit will ensure
that the AT-SPI implementation will convert from GTK to AT-SPI through a
generic (internal API); and, finally, we'll remove the widget type
checks in the AT-SPI implementation of GtkATContext, and only check for
GtkAccessibleText.

Fixes: #5912
2024-02-20 12:19:48 -05:00
Matthias Clasen
04f8170841 Merge branch 'camelCaseNick/search-entry-input-hint-and-purpose' into 'main'
searchentry: pass through text's input-purpose and -hints as properties

See merge request GNOME/gtk!6921
2024-02-20 12:36:07 +00:00
Markus Göllnitz
1124793702 searchentry: pass through text's input-purpose and -hints as properties
The use cases for and reasons of having Gtk.SearchEntries
is wide range. Thus, it makes sense to let users of it
manually set input-purpose and input-hints for improved
input method support there.

see: https://gitlab.gnome.org/GNOME/Initiatives/-/issues/50

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
2024-02-20 04:10:23 +01:00
Matthias Clasen
8d4b0f05da Merge branch 'matthiasc/for-main' into 'main'
editable: Improve preconditions

See merge request GNOME/gtk!6920
2024-02-19 20:23:11 +00:00
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
Ben Mather
cb652c7f0f x11: Read window position relative to root window rather than parent
This fixes monitor enter and leave events on X11, and probably other
things.  Previously, it looks like the coordinates were relative to the
top left corner of the window shadow and so never changed.
2024-02-19 14:21:57 +00: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
Arjan Molenaar
ee06ac3ad2 macos: determine zoomed state via NSWindow isZoomed
With our custom logic out of the way, this just works.
Maximized state is also update on move, since a moved maximized
window is no longer considered maximized in macOS land.
2024-02-18 14:33:26 +01:00
Arjan Molenaar
19a8870f76 macos: use native zoom/unzoom logic
In macOS, when moving a maximized window, it's not automatically
restored to its default size.

In addition, GdkMacosWindow should not check surface layout properties,
since those properties are lagging, e.i. are set after the (native)
window state has been updated.
2024-02-18 14:33:26 +01:00
Asier Sarasua Garmendia
d828f2477e Update Basque translation 2024-02-18 07:47:54 +00:00
Arjan Molenaar
99a3a7e94e macos: deduplicate compute_size logic
It's used in `present` currently. Need to figure out if it really
belongs there: in Wayland no size computation is done in the
`present` handler.
2024-02-17 22:47:47 +01: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
Arjan Molenaar
a516441513 macos: Fix window state of initially maximized windows
GdkSurface maintains state that shadows the actual window state.
This state is not always updated in the macos backend.

In our case, when a window is initially maximized, `setFrame:display:`
was called and `inMaximizeTransition` was set.  However,
`windowDidEndLiveResize:` was never called and `inMaximizeTransition`
was never unset, making the application think the window is still
maximized.

Additionally, `windowShouldZoom:toFrame:` is only called when the window
is maximized, not when it's unmaximized.

By checking and setting the state in `windowDidResize:` we can at least
be sure that the internal maximized state is only set if the window
takes up all desktop space: the screen's visible frame.
2024-02-17 21:04:50 +01: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