Lukáš Tyrychtr
01549e3c91
Take the widget transform into account when computing the bounds for a11y
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
bc48bfc2b6
a11y: Use a DOM-like API for iterating accessible objects
...
The `get_child_at_index()` API model comes from AT-SPI, and it's not an
efficient design, especially when coupled with large widgets.
Replace `get_child_at_index()` with `get_first_accessible_child()` and
`get_next_accessible_sibling()`.
That allows efficiently retrieving all the children, simplifies the
implementation of GtkAccessible in GtkWidget and closely resembeles the
GtkWidget API.
Getting the last child and previous sibling for iterating backwards is
not a part of the interface at the moment, but they can be added at a
later date.
Note that this change required tracking the next stack page in
GtkStackPage.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
6100258ba2
a11y: Rename GtkAccessible.get_parent
...
Avoid a collision when the type implementing the GtkAccessible interface
already has a `get_parent()` method—like GtkWidget.
2023-02-03 11:49:17 +01:00
Emmanuele Bassi
e083bd7920
Apply trivial review suggestions
2023-02-03 11:49:17 +01:00
Emmanuele Bassi
e915546b44
Add versioned symbol annotations
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
b6cfe35940
Style fixes
...
Documentation and coding style updates.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
4cd9fd9b15
stack: Use a pointer array for children
...
Reduce our dependency on linked lists; pointer arrays are better at
cache locality.
Additionally, we can avoid quadratic behaviors when finding a child at a
given index.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
6f8cab0e9d
Style fix
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
6eb9161906
Improve documentation
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
d13695f586
a11y: Implement new GtkAccessible vfuncs in GtkStack
...
Implement the virtual a11y children for GtkStack.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
749919c551
Update API docs
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
58980e0b4a
Make GtkAccessible public
...
Out of tree classes need to be able to implement the GtkAccessible
interface, in order to implement custom accessible objects.
Fixes : #4240
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
5813a5cace
a11y: Add bounds rectangle to GtkAccessible
...
Make the bounds calculation part of the accessible interface.
Bounds are used by ATs like Orca to implement features like Flat Review:
https://help.gnome.org/users/orca/stable/howto_flat_review.html.en
Or to determine the area of a non-presentational widget.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
f88b777fe5
widget: Implement new GtkAccessible vfuncs
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
a80af681b8
a11y: Skip non-presentable objects
...
Don't get confused with non-presentable objects when iterating the list
of children.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
94695bb276
a11y: Use GtkAccessible for tree traversal
...
Remove the widget tree dependence from GtkAtSpiContext.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
be36113826
a11y: Implement the new GtkAccessible vfuncs
...
Implement the gtk_accessible functions and begin removing the old widget
based tree calls.
2023-02-03 11:49:17 +01:00
Lukáš Tyrychtr
5dfbaa53fc
a11y: Add DOM-like API to GtkAccessible
...
Add get_parent and get_child_at_index to GtkAccessible so we can
decouple the a11y tree from the widget tree.
2023-02-03 11:49:17 +01:00
Matthias Clasen
a13ddcb67b
Merge branch 'filechooser-sidebar' into 'main'
...
placessidebar: Make all rows ellipsize
Closes #4710
See merge request GNOME/gtk!5471
2023-02-03 09:41:21 +00:00
Carlos Garnacho
d228bae365
Merge branch 'drag-button-issue' into 'main'
...
Fix button mask calculation for Wayland
Closes #5561
See merge request GNOME/gtk!5468
2023-02-03 09:28:01 +00:00
Matthias Clasen
463f12a3bb
placessidebar: Make all rows ellipsize
...
Otherwise, we end up with a single long row
pushing the content of all the other rows
off to the left, which is much worse than
ellipsizing.
Fixes : #4710
2023-02-03 10:00:03 +01:00
Matthias Clasen
3f87b130ba
NEWS: Updates
2023-02-03 09:26:50 +01:00
Benjamin Otte
c17049c6d1
Merge branch 'wip/otte/gl-is-current' into 'main'
...
gdk: Add private GLContext::is_current() check
Closes #5392
See merge request GNOME/gtk!5463
2023-02-02 21:56:32 +00:00
Arjan Molenaar
f000baf0d6
wayland: Fix button mask for button 2 and 3
...
Wayland and GTK order mouse button 2 and 3 differently.
Fixes #5561 .
2023-02-02 21:48:58 +01:00
Arjan Molenaar
aef4c50155
Allow all mouse buttons to be used for the drawingarea demo
...
So we can test if the drag gesture works with all mouse buttons.
2023-02-02 21:29:45 +01:00
Matthias Clasen
2a1e4b8621
Merge branch 'matthiasc/for-main' into 'main'
...
Matthiasc/for main
See merge request GNOME/gtk!5467
2023-02-02 17:36:44 +00:00
Matthias Clasen
cabd18fba0
textbtree: Fix a compiler warning
2023-02-02 17:15:28 +01:00
Matthias Clasen
1da4782262
gsk: Fix a compiler warning
2023-02-02 17:15:28 +01:00
Matthias Clasen
8911ed5d9b
Merge branch 'monitor-description' into 'main'
...
Add GdkMonitor::description
See merge request GNOME/gtk!5466
2023-02-02 14:12:23 +00:00
Matthias Clasen
294b659dc1
Merge branch 'wip/carlosg/deprecations' into 'main'
...
Some deprecations and cleanups
See merge request GNOME/gtk!5465
2023-02-02 14:11:58 +00:00
Carlos Garnacho
7ad74ad6c3
gdk/wayland: Deprecate GdkDisplay windowing-specific for startup IDs
...
This is currently just used as a convenience storage of the startup ID
between the GtkApplication and the GtkWindow (after it's ready to notify
on it).
This could be untangled in the GTK layers so there is no involvement
from GDK in keeping the startup ID around, in the mean time just deprecate
these gdk_wayland* API calls.
2023-02-02 12:50:59 +01:00
Carlos Garnacho
bb777507ce
gtkmodelbutton: Avoid gtk_gesture_set_sequence_state()
...
It is not necessary for this widget to know about the specific
sequence that is interacting.
2023-02-02 12:50:59 +01:00
Carlos Garnacho
1e1d79d4f7
gtktextview: Avoid gtk_gesture_set_sequence_state()
...
Use gtk_gesture_set_state() as this widget does not need specific
knowledge on the sequence being used for interaction.
2023-02-02 12:50:59 +01:00
Carlos Garnacho
a254a4529f
gtkscrolledwindow: Clean up input handling a bit
...
These pieces were added in commit 8d2f81cca4
, but are no longer
necessary since there's no capture_button_press special behavior
toggle.
This can be simplified again.
2023-02-02 12:50:59 +01:00
Matthias Clasen
e7bd691532
inspector: Show monitor descriptions
2023-02-02 12:32:28 +01:00
Matthias Clasen
4e62350232
wayland: Set up monitor descriptions
...
We get this information in the xdg_output protocol.
2023-02-02 12:32:28 +01:00
Matthias Clasen
2c883a70e2
Add GdkMonitor::description
...
This is the right string to when showing
monitors in the UI.
2023-02-02 12:32:28 +01:00
Matthias Clasen
3dfeb2fd37
monitor: Document connector names better
2023-02-02 12:32:28 +01:00
Carlos Garnacho
3ba3e8286f
gtkwindowhandle: Refactor click handling a bit
...
Do not get a GdkEvent first and foremost, and only do that in the
parts where the GdkEvent is absolutely necessary (i.e. popping up
the WM menu for the window).
2023-02-02 11:21:22 +01:00
Carlos Garnacho
fbf4817ef5
gtkgesture: Deprecate gtk_gesture_set_sequence_state()
...
We can abstract widgets about the specific ongoing sequences that
are triggering a GtkGesture. This used to be more necessary in
GTK3 world where complex widgets might have required handling
different events in different areas, but in GTK4 world that would
be done with multiple widgets.
This is no longer necessary to carry forward.
2023-02-02 11:21:22 +01:00
Carlos Garnacho
db43e0669f
gtkscrolledwindow: Avoid gtk_gesture_set_sequence_state()
...
This widget does not require special knowledge about the ongoing
event sequences, just make it use gtk_gesture_set_state() generically.
2023-02-02 11:21:22 +01:00
Carlos Garnacho
386c77b13d
gtkwindowhandle: Avoid gtk_gesture_set_sequence_state()
...
It does not require special knowledge about the ongoing event
sequences, and it can instead trust the event controller. Make
it use gtk_gesture_set_state() generically.
2023-02-02 11:21:21 +01:00
Matthias Clasen
e6998dffe8
Merge branch 'small-gltexture-cleanup' into 'main'
...
gltexture: Small refactoring
See merge request GNOME/gtk!5464
2023-02-02 09:16:09 +00:00
Matthias Clasen
12057c8a30
gltexture: Small refactoring
...
We do this in two places, so factor out
the dropping of GL resources into a helper.
2023-02-02 10:01:36 +01:00
Matthias Clasen
b7c422cb98
ci: Stop running the asan build every time
...
It fails because of address sanitizer crashes,
and takes a long time. It is not that useful
in this shape.
2023-02-02 09:07:10 +01:00
Matthias Clasen
1c76f6586b
Update po/POTFILES.in
...
Deprecations affect this file.
2023-02-02 09:05:31 +01:00
Matthias Clasen
d43968f7b6
Fix a deprecation warning
2023-02-02 09:03:26 +01:00
Matthias Clasen
26650787e1
main: Compiler warnin gfixes
2023-02-02 08:44:53 +01:00
Matthias Clasen
b4ef072188
icontheme: Compiler warning fixes
2023-02-02 08:44:28 +01:00
Matthias Clasen
3858c5282c
Deprecate GtkAssistant
...
It is a dialog-like toplevel, and libadwaita has
replacement parts (like AdwCarousel).
2023-02-02 08:39:25 +01:00