Commit Graph

79700 Commits

Author SHA1 Message Date
Emmanuele Bassi
68d2e9c068 a11y: Add "terminal" role
Not in the WAI-ARIA spec, but UI toolkits have terminal widgets.
2024-02-22 14:46:11 +00:00
Ekaterine Papava
89ba937fd3 Update Georgian translation 2024-02-22 13:57:24 +00:00
Emmanuele Bassi
840cd6f10f Merge branch 'michaelweghorn/a11y_fix_atspi_getcharacteratoffset' into 'main'
a11y: Fix offset handling for AT-SPI GetCharacterAtOffset

See merge request GNOME/gtk!6931
2024-02-22 13:16:42 +00:00
Yuri Chornoivan
cccfc1a38d Update Ukrainian translation 2024-02-22 12:53:09 +00:00
Michael Weghorn
ff26aa2fa7 a11y: Fix offset handling for AT-SPI GetCharacterAtOffset
The text retrieved using `gtk_accessible_text_get_contents`
already contains only the character at the given offset,
and so the character is at index 0 in `str`, rather than at
the same offset again, so adjust this accordingly.

With this in place, querying the character in a
LibreOffice paragraph consisting of the text
"Hello world." now gives the expected results
with a pending LibreOffice change [1] to support
the new GtkAccessibleText interface:

    In [1]: text  = acc.queryText()
    In [2]: text.getCharacterAtOffset(0)
    Out[2]: 72
    In [3]: text.getCharacterAtOffset(1)
    Out[3]: 101
    In [4]: text.getCharacterAtOffset(2)
    Out[4]: 108
    In [5]: text.getCharacterAtOffset(3)
    Out[5]: 108
    In [6]: text.getCharacterAtOffset(4)
    Out[6]: 111

Previously, this would only work correctly
for an index of 0:

    In [1]: text = acc.queryText()
    In [2]: text.getCharacterAtOffset(0)
    Out[2]: 72
    In [3]: text.getCharacterAtOffset(1)
    Out[3]: 0
    In [4]: text.getCharacterAtOffset(2)
    Out[4]: 0
    In [5]: text.getCharacterAtOffset(3)
    Out[5]: 0
    In [6]: text.getCharacterAtOffset(4)
    Out[6]: 0

[1] https://gerrit.libreoffice.org/c/core/+/163733
2024-02-22 13:11:01 +01:00
Danial Behzadi
7192e67a6f Update Persian translation 2024-02-22 11:49:08 +00:00
Matthias Clasen
5354b91e64 Merge branch 'rendernode-tool-compare' into 'main'
rendernode tool: Add a compare command

See merge request GNOME/gtk!6930
2024-02-22 11:34:51 +00:00
Matthias Clasen
c9c6b7bb2a rendernode tool: Add a compare command
This command can be used to compare the rendering of a node
to a reference image. It can also be used to compare the
renderings of two nodes, or to compare two images.
2024-02-21 22:27:32 -05:00
Matthias Clasen
c93fa922dc Merge branch 'x11-shadow-fix' into 'main'
x11: Shadows require compositing

Closes #6464

See merge request GNOME/gtk!6928
2024-02-21 22:58:41 +00:00
Jordi Mas
8d7bfa2628 Update Catalan translation 2024-02-21 21:16:32 +01:00
Matthias Clasen
e6a4cc8ba2 x11: Shadows require compositing
We can only do client-side shadows if we have an rgba visual
and a compositing wm.

Fallout from 6e7893d5.

Fixes: #6464
2024-02-21 12:35:02 -05:00
Matthias Clasen
7926ee68b8 Merge branch 'matthiasc/for-main' into 'main'
editable: Less draconian preconditions

Closes #6463

See merge request GNOME/gtk!6927
2024-02-21 12:37:04 +00:00
Matthias Clasen
239d47791d editable: Less draconian preconditions
Getting or deleting an empty string should be ok, and we do it
ourselves, e.g. in the file chooser.

Fixes: #6463
2024-02-21 07:14:44 -05:00
Daniel Mustieles
33f210bc85 Update Spanish translation 2024-02-21 11:38:09 +00:00
Matthias Clasen
021aae84dd Post-release version bump 2024-02-20 15:02:39 -05:00
Matthias Clasen
e8508762f5 4.13.8 2024-02-20 15:02:39 -05:00
Matej Urbančič
a0bbdfbeee Update Slovenian translation 2024-02-20 19:42:53 +00:00
Matthias Clasen
f6561fc401 NEWS: Updates 2024-02-20 14:33:41 -05:00
Matthias Clasen
dfe56c8b70 Merge branch 'ebassi/accessible-text' into 'main'
a11y: Add GtkAccessibleText interface

Closes #5912

See merge request GNOME/gtk!6666
2024-02-20 19:22:02 +00:00
Matthias Clasen
7f29b466be Test the accessible implementation for GtkTextView 2024-02-20 13:53:08 -05:00
Matthias Clasen
8f5a185ae5 Test the accessible implementation for GtkInscription 2024-02-20 13:53:08 -05:00
Matthias Clasen
309b28fa2c Test the accessible implementation for GtkText 2024-02-20 13:53:08 -05:00
Matthias Clasen
e9f311e6b6 Test the accessible implementation for GtkLabel 2024-02-20 13:53:08 -05:00
Matthias Clasen
045262282b Implement GtkAccessibleText for GtkTextView 2024-02-20 13:53:08 -05:00
Matthias Clasen
a44701faa2 Implement GtkAccessibleText for GtkText 2024-02-20 13:53:08 -05:00
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