Lukáš Tyrychtr [Mon, 16 Jan 2023 10:39:41 +0000 (11:39 +0100)]
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.
Matthias Clasen [Fri, 3 Feb 2023 13:39:21 +0000 (13:39 +0000)]
Merge branch 'file-chooser-context-menu' into 'main'
filechooser: Fix context menus
Closes #5554
See merge request GNOME/gtk!5472
Matthias Clasen [Fri, 3 Feb 2023 13:19:26 +0000 (13:19 +0000)]
Merge branch 'drag-icon-robustness' into 'main'
dragicon: Handle files without info
See merge request GNOME/gtk!5460
Matthias Clasen [Fri, 3 Feb 2023 13:16:40 +0000 (14:16 +0100)]
filechooser: Fix context menus
We only want to show the file list context menu
when we are over the file list.
Fixes: #5554
Matthias Clasen [Fri, 3 Feb 2023 11:31:06 +0000 (11:31 +0000)]
Merge branch 'ebassi/public-accessible' into 'main'
Make GtkAccessible public
Closes #4240
See merge request GNOME/gtk!5470
Matthias Clasen [Fri, 3 Feb 2023 10:40:52 +0000 (11:40 +0100)]
inspector: Show if accessibles aren't realized
This prevents confusion and makes it clear
what is going on.
Emmanuele Bassi [Thu, 2 Feb 2023 14:44:15 +0000 (15:44 +0100)]
a11y: Documentation and code style fixes
Emmanuele Bassi [Thu, 2 Feb 2023 14:43:29 +0000 (15:43 +0100)]
a11y: Fix get_bounds() implementation
Don't allocate graphene_rect_t, and fix the size retrieval.
Lukáš Tyrychtr [Thu, 5 Jan 2023 15:06:24 +0000 (16:06 +0100)]
Take the widget transform into account when computing the bounds for a11y
Lukáš Tyrychtr [Fri, 25 Nov 2022 15:55:12 +0000 (16:55 +0100)]
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.
Lukáš Tyrychtr [Tue, 22 Nov 2022 14:17:30 +0000 (15:17 +0100)]
a11y: Rename GtkAccessible.get_parent
Avoid a collision when the type implementing the GtkAccessible interface
already has a `get_parent()` method—like GtkWidget.
Emmanuele Bassi [Tue, 22 Nov 2022 12:54:42 +0000 (12:54 +0000)]
Apply trivial review suggestions
Emmanuele Bassi [Fri, 3 Feb 2023 09:48:24 +0000 (10:48 +0100)]
Add versioned symbol annotations
Lukáš Tyrychtr [Fri, 16 Sep 2022 16:48:40 +0000 (18:48 +0200)]
Style fixes
Documentation and coding style updates.
Lukáš Tyrychtr [Fri, 16 Sep 2022 14:29:53 +0000 (16:29 +0200)]
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.
Lukáš Tyrychtr [Fri, 16 Sep 2022 11:44:34 +0000 (13:44 +0200)]
Style fix
Lukáš Tyrychtr [Thu, 15 Sep 2022 14:00:25 +0000 (16:00 +0200)]
Improve documentation
Lukáš Tyrychtr [Mon, 12 Sep 2022 15:23:29 +0000 (17:23 +0200)]
a11y: Implement new GtkAccessible vfuncs in GtkStack
Implement the virtual a11y children for GtkStack.
Lukáš Tyrychtr [Mon, 12 Sep 2022 12:44:46 +0000 (14:44 +0200)]
Update API docs
Lukáš Tyrychtr [Mon, 12 Sep 2022 12:40:11 +0000 (14:40 +0200)]
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
Lukáš Tyrychtr [Mon, 12 Sep 2022 09:55:06 +0000 (11:55 +0200)]
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.
Lukáš Tyrychtr [Fri, 9 Sep 2022 15:02:59 +0000 (17:02 +0200)]
widget: Implement new GtkAccessible vfuncs
Lukáš Tyrychtr [Fri, 9 Sep 2022 15:02:34 +0000 (17:02 +0200)]
a11y: Skip non-presentable objects
Don't get confused with non-presentable objects when iterating the list
of children.
Lukáš Tyrychtr [Fri, 9 Sep 2022 12:16:20 +0000 (14:16 +0200)]
a11y: Use GtkAccessible for tree traversal
Remove the widget tree dependence from GtkAtSpiContext.
Lukáš Tyrychtr [Fri, 9 Sep 2022 09:10:25 +0000 (11:10 +0200)]
a11y: Implement the new GtkAccessible vfuncs
Implement the gtk_accessible functions and begin removing the old widget
based tree calls.
Lukáš Tyrychtr [Fri, 9 Sep 2022 09:09:31 +0000 (11:09 +0200)]
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.
Matthias Clasen [Fri, 3 Feb 2023 09:41:21 +0000 (09:41 +0000)]
Merge branch 'filechooser-sidebar' into 'main'
placessidebar: Make all rows ellipsize
Closes #4710
See merge request GNOME/gtk!5471
Carlos Garnacho [Fri, 3 Feb 2023 09:28:01 +0000 (09:28 +0000)]
Merge branch 'drag-button-issue' into 'main'
Fix button mask calculation for Wayland
Closes #5561
See merge request GNOME/gtk!5468
Matthias Clasen [Fri, 3 Feb 2023 09:00:03 +0000 (10:00 +0100)]
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
Matthias Clasen [Fri, 3 Feb 2023 08:26:50 +0000 (09:26 +0100)]
NEWS: Updates
Benjamin Otte [Thu, 2 Feb 2023 21:56:32 +0000 (21:56 +0000)]
Merge branch 'wip/otte/gl-is-current' into 'main'
gdk: Add private GLContext::is_current() check
Closes #5392
See merge request GNOME/gtk!5463
Arjan Molenaar [Thu, 2 Feb 2023 20:48:58 +0000 (21:48 +0100)]
wayland: Fix button mask for button 2 and 3
Wayland and GTK order mouse button 2 and 3 differently.
Fixes #5561.
Arjan Molenaar [Thu, 2 Feb 2023 10:48:51 +0000 (11:48 +0100)]
Allow all mouse buttons to be used for the drawingarea demo
So we can test if the drag gesture works with all mouse buttons.
Matthias Clasen [Thu, 2 Feb 2023 17:36:44 +0000 (17:36 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Matthiasc/for main
See merge request GNOME/gtk!5467
Matthias Clasen [Thu, 2 Feb 2023 16:11:38 +0000 (17:11 +0100)]
textbtree: Fix a compiler warning
Matthias Clasen [Thu, 2 Feb 2023 16:10:09 +0000 (17:10 +0100)]
gsk: Fix a compiler warning
Matthias Clasen [Thu, 2 Feb 2023 14:12:23 +0000 (14:12 +0000)]
Merge branch 'monitor-description' into 'main'
Add GdkMonitor::description
See merge request GNOME/gtk!5466
Matthias Clasen [Thu, 2 Feb 2023 14:11:58 +0000 (14:11 +0000)]
Merge branch 'wip/carlosg/deprecations' into 'main'
Some deprecations and cleanups
See merge request GNOME/gtk!5465
Carlos Garnacho [Thu, 2 Feb 2023 11:10:56 +0000 (12:10 +0100)]
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.
Carlos Garnacho [Thu, 2 Feb 2023 10:57:06 +0000 (11:57 +0100)]
gtkmodelbutton: Avoid gtk_gesture_set_sequence_state()
It is not necessary for this widget to know about the specific
sequence that is interacting.
Carlos Garnacho [Thu, 2 Feb 2023 10:54:36 +0000 (11:54 +0100)]
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.
Carlos Garnacho [Thu, 2 Feb 2023 10:15:24 +0000 (11:15 +0100)]
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.
Matthias Clasen [Thu, 2 Feb 2023 11:32:05 +0000 (12:32 +0100)]
inspector: Show monitor descriptions
Matthias Clasen [Thu, 2 Feb 2023 11:31:38 +0000 (12:31 +0100)]
wayland: Set up monitor descriptions
We get this information in the xdg_output protocol.
Matthias Clasen [Thu, 2 Feb 2023 11:30:46 +0000 (12:30 +0100)]
Add GdkMonitor::description
This is the right string to when showing
monitors in the UI.
Matthias Clasen [Thu, 2 Feb 2023 11:14:49 +0000 (12:14 +0100)]
monitor: Document connector names better
Carlos Garnacho [Thu, 2 Feb 2023 09:51:08 +0000 (10:51 +0100)]
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).
Carlos Garnacho [Thu, 2 Feb 2023 09:36:06 +0000 (10:36 +0100)]
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.
Carlos Garnacho [Thu, 2 Feb 2023 09:35:15 +0000 (10:35 +0100)]
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.
Carlos Garnacho [Thu, 2 Feb 2023 09:32:56 +0000 (10:32 +0100)]
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.
Matthias Clasen [Thu, 2 Feb 2023 09:16:09 +0000 (09:16 +0000)]
Merge branch 'small-gltexture-cleanup' into 'main'
gltexture: Small refactoring
See merge request GNOME/gtk!5464
Matthias Clasen [Mon, 30 Jan 2023 13:24:02 +0000 (08:24 -0500)]
gltexture: Small refactoring
We do this in two places, so factor out
the dropping of GL resources into a helper.
Matthias Clasen [Thu, 2 Feb 2023 08:07:10 +0000 (09:07 +0100)]
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.
Matthias Clasen [Thu, 2 Feb 2023 08:05:31 +0000 (09:05 +0100)]
Update po/POTFILES.in
Deprecations affect this file.
Matthias Clasen [Thu, 2 Feb 2023 08:03:26 +0000 (09:03 +0100)]
Fix a deprecation warning
Matthias Clasen [Thu, 2 Feb 2023 07:44:53 +0000 (08:44 +0100)]
main: Compiler warnin gfixes
Matthias Clasen [Thu, 2 Feb 2023 07:44:28 +0000 (08:44 +0100)]
icontheme: Compiler warning fixes
Matthias Clasen [Thu, 2 Feb 2023 07:28:13 +0000 (08:28 +0100)]
Deprecate GtkAssistant
It is a dialog-like toplevel, and libadwaita has
replacement parts (like AdwCarousel).
Matthias Clasen [Wed, 1 Feb 2023 17:18:28 +0000 (18:18 +0100)]
Deprecate GtkLockButton
This is a very specialized widget, and should really just
live with the applications where it is used.
Matthias Clasen [Wed, 1 Feb 2023 17:03:59 +0000 (18:03 +0100)]
Deprecate GtkStatusbar
The design patterns using statusbar are no longer popular,
and it is pretty easy to make a statusbar yourself with boxes
and labels, if you need one. The only thing special about
GtkStatusbar was its window resize handle, but that has
been gone for a long time.
Matthias Clasen [Wed, 1 Feb 2023 16:58:43 +0000 (17:58 +0100)]
Deprecate more startup-notification API
Benjamin Otte [Thu, 2 Feb 2023 01:49:56 +0000 (02:49 +0100)]
gdk: Add private GLContext::is_current() check
... and use this check in gdk_gl_context_make_current() and
gdk_gl_context_get_current() to make sure the context really is still
current.
The context no longer being current can happen when external GL
implementations make their own contexts current in the same threads GDK
contexts are used in.
And that can happen for example by WebKit.
Theoretically, this should also allow external EGL code to run in X11
applications when GDK chooses to use GLX, but I didn't try it.
Fixes #5392
Benjamin Otte [Thu, 2 Feb 2023 03:23:16 +0000 (04:23 +0100)]
win32: Remove unused variable
Fran Dieguez [Wed, 1 Feb 2023 19:12:29 +0000 (19:12 +0000)]
Update Galician translation
Benjamin Otte [Wed, 1 Feb 2023 18:47:28 +0000 (18:47 +0000)]
Merge branch 'fix-gltexture-confusion' into 'main'
gltexture: Use the right context
See merge request GNOME/gtk!5461
Matthias Clasen [Wed, 1 Feb 2023 17:38:22 +0000 (18:38 +0100)]
Cosmetics
Daniel Mustieles [Wed, 1 Feb 2023 15:28:00 +0000 (15:28 +0000)]
Update Spanish translation
Matthias Clasen [Tue, 31 Jan 2023 12:23:59 +0000 (07:23 -0500)]
gltexture: Use the right context
When checking characteristics of the context
for downloading, we were using self->context,
even though we are using a possibly different
context for downloading.
Pass the right context along and use it.
Kukuh Syafaat [Wed, 1 Feb 2023 03:14:46 +0000 (03:14 +0000)]
Update Indonesian translation
Matthias Clasen [Tue, 31 Jan 2023 12:28:27 +0000 (12:28 +0000)]
Merge branch 'fix-gst-sync' into 'main'
gst: Fix synchronization
See merge request GNOME/gtk!5459
Matthias Clasen [Mon, 30 Jan 2023 20:00:53 +0000 (15:00 -0500)]
gst: Rename a field for clarity
gst_gdk_context is clearer than gst_app_context. Maybe
Matthias Clasen [Mon, 30 Jan 2023 19:28:24 +0000 (19:28 +0000)]
Merge branch 'file-chooser-dnd-crash' into 'main'
filechooserwidget: Fix file chooser crash when dropping empty file list
See merge request GNOME/gtk!5456
Fina Wilke [Mon, 30 Jan 2023 19:28:24 +0000 (19:28 +0000)]
filechooserwidget: Fix file chooser crash when dropping empty file list
Matthias Clasen [Mon, 30 Jan 2023 19:00:59 +0000 (14:00 -0500)]
filetransfer: Be more careful around files
File may not have paths, and we should handle
that without incident. While we are at it, add
some logging so GDK_DEBUG=dnd gives us enough
output to see what is going on.
Matthias Clasen [Mon, 30 Jan 2023 18:26:37 +0000 (13:26 -0500)]
dragicon: Handle files without info
g_file_query_info can (and does) fail,
occasionally. Handle it.
Matthias Clasen [Mon, 30 Jan 2023 16:56:50 +0000 (11:56 -0500)]
gst: Fix synchronization
It does not make sense to sync and wait in the
same context, that is just a no-op. The intention
of this code clearly was to sync in the gst
context, and wait in the gdk one.
That also matches what the gtk sink implementation
in gstreamer does.
Matthias Clasen [Mon, 30 Jan 2023 12:29:33 +0000 (12:29 +0000)]
Merge branch 'password-entry-unrealize' into 'main'
passwordentry: Fix an asymmetry
Closes #5285
See merge request GNOME/gtk!5457
Matthias Clasen [Mon, 30 Jan 2023 03:37:51 +0000 (22:37 -0500)]
passwordentry: Fix an asymmetry
When connecting a signal in realize,
we should disconnect in unrealize.
Fixes: #5285
Matthias Clasen [Sun, 29 Jan 2023 02:13:10 +0000 (21:13 -0500)]
gsk: Quiet a compiler warning
Jürgen Benvenuti [Sat, 28 Jan 2023 19:59:19 +0000 (19:59 +0000)]
Update German translation
Benjamin Otte [Sat, 28 Jan 2023 18:26:00 +0000 (18:26 +0000)]
Merge branch 'tooltip-size-simplification' into 'main'
tooltip: Don't play games with max-width-chars
Closes #4470 and #5521
See merge request GNOME/gtk!5455
Matthias Clasen [Sat, 28 Jan 2023 15:32:19 +0000 (10:32 -0500)]
tooltip: Prevent too-wide tooltip windows
Set the label to expand, so it actually fills
the width that we allocated for it, instead
of shrinking back to the minimum width for
its height.
Fixes: #5521
Matthias Clasen [Sat, 28 Jan 2023 18:04:01 +0000 (13:04 -0500)]
tooltip: Don't play games with max-width-chars
Setting max-width-chars to the number of characters
in the string works ok only as long as the average
char width we get from Pango matches reality. Sadly
that seems not always the case, and this code was
causing short Chinese tooltips to always be broken
into two lines.
Fixes: #4470
Piotr Drąg [Sat, 28 Jan 2023 13:05:01 +0000 (14:05 +0100)]
Update POTFILES.in
Matthias Clasen [Sat, 28 Jan 2023 03:24:19 +0000 (03:24 +0000)]
Merge branch 'position-as-double' into 'main'
Boyscouting: fix position type in `gtk_drag_source_drag_begin()`
See merge request GNOME/gtk!5437
Carlos Garnacho [Sat, 28 Jan 2023 00:44:25 +0000 (00:44 +0000)]
Merge branch 'work/zzag/activation-token-dbus' into 'main'
wayland: Fix handling of activation-token in org.freedesktop.Application requests
See merge request GNOME/gtk!5151
Yuri Chornoivan [Fri, 27 Jan 2023 19:23:39 +0000 (19:23 +0000)]
Update Ukrainian translation
Vlad Zahorodnii [Thu, 20 Oct 2022 16:33:15 +0000 (19:33 +0300)]
wayland: Fix handling of activation-token in org.freedesktop.Application requests
At the moment, GTK applications search for "desktop-startup-id" in the
platform data on Wayland , but desktop environments such as plasma set
"activation-token" property instead as indicated in the spec:
activation-token: This should be a string of the same value as would
be stored in the XDG_ACTIVATION_TOKEN environment variable, as specified
by the XDG Activation protocol for Wayland.
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus
Carlos Garnacho [Fri, 27 Jan 2023 19:20:28 +0000 (19:20 +0000)]
Merge branch 'wip/carlosg/broadway-fix' into 'main'
gdk/broadway: Add deprecation guards around gdk_display_put_event()
See merge request GNOME/gtk!5450
Carlos Garnacho [Fri, 27 Jan 2023 18:39:53 +0000 (19:39 +0100)]
gdk/broadway: Add deprecation guards around gdk_display_put_event()
This went missing.
Matthias Clasen [Fri, 27 Jan 2023 16:22:17 +0000 (16:22 +0000)]
Merge branch 'fix_5551' into 'main'
object_tree.c: One gtk_list_item_get_child call is redundant
Closes #5551
See merge request GNOME/gtk!5449
Matthias Clasen [Fri, 27 Jan 2023 14:54:33 +0000 (14:54 +0000)]
Merge branch 'wip/sophie-h/scrolled-window-propagate-event' into 'main'
scrolledWindow: Propagate event for no scrolling
See merge request GNOME/gtk!5447
Lukáš Tyrychtr [Fri, 27 Jan 2023 14:43:24 +0000 (15:43 +0100)]
object_tree.c: One gtk_list_item_get_child call is redundant
Fixes #5551
Hugo Carvalho [Fri, 27 Jan 2023 14:26:32 +0000 (14:26 +0000)]
Update Portuguese translation
Sophie Herold [Wed, 25 Jan 2023 21:26:07 +0000 (22:26 +0100)]
scrolledWindow: Propagate event for no scrolling
Matthias Clasen [Thu, 26 Jan 2023 02:44:54 +0000 (02:44 +0000)]
Merge branch 'broadway-modal-hint' into 'main'
[GTK4] gdk/broadway: Implements modal hint for Broadway surface
See merge request GNOME/gtk!4428
Matthias Clasen [Wed, 25 Jan 2023 13:08:07 +0000 (13:08 +0000)]
Merge branch 'fix_5543' into 'main'
GtkCssProvider: fix element type in docs
Closes #5543
See merge request GNOME/gtk!5441
Lukáš Tyrychtr [Wed, 25 Jan 2023 10:46:53 +0000 (11:46 +0100)]
Actually, the annotation is not needed in this case
Yosef Or Boczko [Wed, 25 Jan 2023 08:15:09 +0000 (08:15 +0000)]
Update Hebrew translation
Matthias Clasen [Tue, 24 Jan 2023 16:37:23 +0000 (16:37 +0000)]
Merge branch 'macos-fix-popups' into 'main'
macos: Fix popup event handling
Closes #5528
See merge request GNOME/gtk!5436