Commit Graph

74791 Commits

Author SHA1 Message Date
Matthias Clasen
b2071cdeb5 4.9.3 2023-02-04 16:16:54 +01:00
Matthias Clasen
1a292bf8ab Merge branch 'wip/carlosg/scroll-fix' into 'main'
gdk/x11: Reset all scroll valuators on enter

Closes #4160

See merge request GNOME/gtk!5479
2023-02-04 13:14:02 +00:00
Matthias Clasen
7e07d63a6c Merge branch 'ebassi/stack-at-context' into 'main'
a11y: Clear the GtkATContext in a single step

See merge request GNOME/gtk!5477
2023-02-04 12:37:20 +00:00
Carlos Garnacho
824e983372 gdk/x11: Reset all scroll valuators on enter
We no longer need to make much distinction between multiple logical
devices, plus it breaks esp. with the Xwayland input device distribution.
Just iterate across all devices and reset their scroll valuators.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4160
2023-02-04 13:13:19 +01:00
Matthias Clasen
9e5417c6c7 Merge branch 'wip/carlosg/wayland-device-refactor' into 'main'
Refactor some wayland code

See merge request GNOME/gtk!5473
2023-02-04 07:48:33 +00:00
Matthias Clasen
e94dae8536 Merge branch 'rgba-free-checked' into 'main'
gtktextview: Avoid calling gdk_rgba_free for NULL values

See merge request GNOME/gtk!5474
2023-02-04 07:48:24 +00:00
Matthias Clasen
0dd163254d Merge branch 'ebassi/accessible-editable' into 'main'
a11y: Simplify GtkAccessible implementation for editables

See merge request GNOME/gtk!5475
2023-02-04 07:47:36 +00:00
Emmanuele Bassi
341ecab41a a11y: Clear the GtkATContext in a single step
There's no need to unrealize the GtkATContext inside dispose() and then
drop its reference inside finalize().
2023-02-03 17:11:22 +01:00
Marco Trevisan (Treviño)
9eac7ed8b9 gtktextview: Avoid calling gdk_rgba_free for NULL values
Related to glib#2908
2023-02-03 16:41:56 +01:00
Carlos Garnacho
4005eb8fe8 gdk/wayland: Rename gdkkeys-wayland.c file
Since it contains the GdkKeymap implementation, give it a more
obvious name.
2023-02-03 16:15:34 +01:00
Carlos Garnacho
1d4ceac2c5 gdk/wayland: "Split" GdkWaylandDevice implementation out
This is a bit spaghetti right now, since seats and devices were
heavily entangled there are a number of crossed private API calls that
should ideally not be there.

Let this be a first step, so more bits may move from the seat
implementation to devices.
2023-02-03 16:15:34 +01:00
Carlos Garnacho
a5246a6856 gdk/wayland: Split GdkDevicePad wayland implementation
This now lives in its own C file.
2023-02-03 16:08:07 +01:00
Lukáš Tyrychtr
11d235d165 a11y: Simplify GtkAccessible implementation for editables
This commit implements the idea brought up in #5032, and provides a
simple function for GtkEditable implementations using a delegate object.
The accessible state is proxied from the outher GtkEditable to the
delegate.
2023-02-03 16:08:06 +01:00
Carlos Garnacho
af00beb772 gdk/wayland: Move struct declarations to header
These will be used from outside the main file, after we are
done splitting it.
2023-02-03 16:00:01 +01:00
Carlos Garnacho
e5cd9354d5 gdk/wayland: Move GdkWaylandDevice data to private struct
Before splitting this object, avoid leaking details in its struct.
2023-02-03 15:58:11 +01:00
Carlos Garnacho
6426ab7466 gdk/wayland: Rename gdkdevice-wayland.c to gdkseat-wayland.c
This file, event though a clump of input-y objects, has more of
seats than anything else. Rename it so that we can start splitting
these objects out of it.
2023-02-03 15:58:11 +01:00
Matthias Clasen
b710df6f45 Merge branch 'file-chooser-context-menu' into 'main'
filechooser: Fix context menus

Closes #5554

See merge request GNOME/gtk!5472
2023-02-03 13:39:21 +00:00
Matthias Clasen
50998b0ee9 Merge branch 'drag-icon-robustness' into 'main'
dragicon: Handle files without info

See merge request GNOME/gtk!5460
2023-02-03 13:19:26 +00:00
Matthias Clasen
92c2c68c7b filechooser: Fix context menus
We only want to show the file list context menu
when we are over the file list.

Fixes: #5554
2023-02-03 14:17:34 +01:00
Matthias Clasen
c2f5b64b5d Merge branch 'ebassi/public-accessible' into 'main'
Make GtkAccessible public

Closes #4240

See merge request GNOME/gtk!5470
2023-02-03 11:31:06 +00:00
Matthias Clasen
460bf6d8b9 inspector: Show if accessibles aren't realized
This prevents confusion and makes it clear
what is going on.
2023-02-03 11:49:17 +01:00
Emmanuele Bassi
a0dff87c86 a11y: Documentation and code style fixes 2023-02-03 11:49:17 +01:00
Emmanuele Bassi
3015b9f120 a11y: Fix get_bounds() implementation
Don't allocate graphene_rect_t, and fix the size retrieval.
2023-02-03 11:49:17 +01:00
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