Matthias Clasen [Wed, 14 Jun 2023 00:10:32 +0000 (00:10 +0000)]
Merge branch 'wip/carlosg/pad-detection' into 'main'
gdk/wayland: Create pad devices on enter
See merge request GNOME/gtk!6094
Carlos Garnacho [Tue, 13 Jun 2023 22:53:11 +0000 (00:53 +0200)]
gdk: Include pads in GDK_SEAT_CAPABILITY_ALL
The GDK_SEAT_CAPABILITY_TABLET_PAD stood awkwardly out of the
ALL value. Even though it's not a keyboard, its focus has more
resemblance to it, so it should be part of this group together
with keyboards.
Carlos Garnacho [Tue, 13 Jun 2023 22:16:58 +0000 (00:16 +0200)]
gdk/wayland: Create pad devices on enter
We were creating the pad device on wp_tablet_pad.done, but
at that time we do not know what tablet it is associated with,
thus we cannot get appropriate vid/pid/name properties for it.
To get that, we need to wait for the pad to enter a surface,
at that time we do know what tablet it is associated with, so
we can get better information about the device.
There are pads that may plausibly "change" tablet between
one .enter event and the next (e.g. Wacom Express Key Remote),
but this situation is highly unlikely. The pad devices created
are thus persistent until that situation happens.
Matthias Clasen [Tue, 13 Jun 2023 18:28:32 +0000 (18:28 +0000)]
Merge branch 'mcatanzaro/gtk-show-uri-deprecated-for' into 'main'
Change recommended replacement for gtk_show_uri()
See merge request GNOME/gtk!6093
Michael Catanzaro [Tue, 13 Jun 2023 18:00:15 +0000 (13:00 -0500)]
Change recommended replacement for gtk_show_uri()
Problem is GtkFileLauncher is unable to handle all the types of URIs
that are supported by gtk_show_uri(), e.g. help: URIs. GtkUriLauncher
avoids this problem.
Another problem is that GtkUriLauncher is just generally a better choice
for launching URIs, since you don't have to create a GFile in order to
use it. Porting code is slightly simpler.
The documentation still mentions both GtkFileLauncher and GtkUriLauncher
as options, but most people will use whatever the compiler recommends
when it prints the deprecation warning.
Carlos Garnacho [Tue, 13 Jun 2023 11:39:04 +0000 (11:39 +0000)]
Merge branch 'window-clear-resize_cursor-on' into 'main'
window: Clear resize_cursor on leave notify events
See merge request GNOME/gtk!6090
Michel Dänzer [Mon, 12 Jun 2023 16:28:29 +0000 (18:28 +0200)]
window: Clear resize_cursor on leave notify events
When the pointer leaves the window surface, gtk_window_capture_motion
will not be called anymore, so priv->resize_cursor may remain non-NULL
indefinitely without this.
If update_cursor is later called (via gtk_window_maybe_update_cursor) on
a virtual enter notify event (e.g. because the pointer entered a
descendant surface), it would previously re-set the window surface
cursor to priv->resize_cursor, which could result in the wrong cursor
shape being shown for descendant surfaces.
This affected mutter-x11-frames, see
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1557.
One could also say that if the pointer leaves the window surface, it's
trivially not over any window edge.
Matthias Clasen [Mon, 12 Jun 2023 19:18:49 +0000 (19:18 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Matthiasc/for main
See merge request GNOME/gtk!6091
Matthias Clasen [Mon, 12 Jun 2023 17:00:16 +0000 (13:00 -0400)]
ci: Collect artifacts from the asan build
Matthias Clasen [Mon, 12 Jun 2023 16:46:34 +0000 (12:46 -0400)]
listitemmanager: Quiet a compiler warning
Matthias Clasen [Mon, 12 Jun 2023 17:56:26 +0000 (17:56 +0000)]
Merge branch 'a11y-overlay' into 'main'
inspector: Add an a11y overlay
Closes #5883
See merge request GNOME/gtk!6085
Matthias Clasen [Mon, 12 Jun 2023 16:12:29 +0000 (12:12 -0400)]
Fix a crash in gtk-demo
Fixes #5889
Daniel Boles [Mon, 12 Jun 2023 15:29:52 +0000 (16:29 +0100)]
docs/reference/gtk/running: Incl GDK_DEBUG=portals
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5871
Luca Bacci [Mon, 12 Jun 2023 13:55:45 +0000 (13:55 +0000)]
Merge branch 'focus-modal-windows' into 'main'
win32: Focus modal windows when clicking on unfocused parent
See merge request GNOME/gtk!6051
Luca Bacci [Mon, 12 Jun 2023 13:53:00 +0000 (13:53 +0000)]
Merge branch 'center-dialogs' into 'main'
win32: Center newly created transient windows
Closes #5407
See merge request GNOME/gtk!6050
Daniel Rusek [Mon, 12 Jun 2023 13:14:31 +0000 (13:14 +0000)]
Update Czech translation
Matthias Clasen [Fri, 9 Jun 2023 20:51:10 +0000 (16:51 -0400)]
inspector: Add an a11y overlay
Add an overlay that shows a11y issues.
For now, this checks for:
- abstract roles being used
- elements without labels
- required attributes
- required context
Alice Mikhaylenko [Sat, 10 Jun 2023 20:02:15 +0000 (00:02 +0400)]
menubutton: Horizontally expand child
Set hexpand on the outer box so we don't propagate that expand.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5883
Alice Mikhaylenko [Sat, 10 Jun 2023 20:01:19 +0000 (00:01 +0400)]
menubutton: Normalize label layout
- Remove unnecessary halign=center and hexpand=0 dance
- Set hexpand=false on the outer box so we don't propagate hexpand
Matthias Clasen [Mon, 12 Jun 2023 01:48:04 +0000 (01:48 +0000)]
Merge branch 'misc-a11y-fixes' into 'main'
Various a11y improvements
See merge request GNOME/gtk!6089
Matthias Clasen [Sun, 11 Jun 2023 11:04:56 +0000 (07:04 -0400)]
gtk4-demo: Some a11y improvements
Add some labels in the pickers demo.
Matthias Clasen [Mon, 12 Jun 2023 00:19:24 +0000 (20:19 -0400)]
filechooser: Some accessibility improvements
Matthias Clasen [Sun, 11 Jun 2023 23:28:16 +0000 (19:28 -0400)]
togglebutton: Set a11y properties on realize
The pressed property is required, so we need to
make sure that it is set.
Matthias Clasen [Sun, 11 Jun 2023 16:39:08 +0000 (12:39 -0400)]
fontchooser: Add one more accessible property
Matthias Clasen [Sun, 11 Jun 2023 16:38:42 +0000 (12:38 -0400)]
aboutdialog: Set some accessible properties
Matthias Clasen [Sun, 11 Jun 2023 16:38:06 +0000 (12:38 -0400)]
menubutton: Set accessible relations
In the case where we create the popover, mark it
as labelled by the button.
Matthias Clasen [Sun, 11 Jun 2023 16:37:52 +0000 (12:37 -0400)]
shortcutswindow: Add some accessible properties
Matthias Clasen [Sun, 11 Jun 2023 16:37:06 +0000 (12:37 -0400)]
passwordentry: Change an accessible role
The caps-lock icon is really an alert. Maybe
this is in vain, since orca ignores these images.
Matthias Clasen [Sun, 11 Jun 2023 15:14:02 +0000 (15:14 +0000)]
Merge branch 'wip/alice/menu-button' into 'main'
menubutton: Horizontally expand child
Closes #5883
See merge request GNOME/gtk!6084
Matthias Clasen [Sun, 11 Jun 2023 11:12:52 +0000 (11:12 +0000)]
Merge branch 'master' into 'main'
Reset chars_changed_stamp in _gtk_text_btree_unref
Closes #5544
See merge request GNOME/gtk!6087
Daniel Boles [Sun, 11 Jun 2023 10:46:36 +0000 (11:46 +0100)]
Popover: If can't get widget rect, zero output ptr
cherry-pick of commit
a6d40b610be6acb635d8732c11bb6d866bf2e95d
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/893#note_1766079
Bart Jacobs [Sun, 11 Jun 2023 08:57:41 +0000 (08:57 +0000)]
Reset chars_changed_stamp in _gtk_text_btree_unref
This causes an "Invalid text buffer iterator" warning to be produced if a TextIter is used after the TextBuffer is disposed.
Benjamin Otte [Sun, 11 Jun 2023 02:19:13 +0000 (02:19 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
mediafile: Load extension at startup with GTK_MEDIA
See merge request GNOME/gtk!6086
Benjamin Otte [Sun, 11 Jun 2023 01:09:09 +0000 (03:09 +0200)]
vulkan: Handle new nodes being added correctly
When nodes are added, nothing was warning us that we need to bump
N_RENDER_NODES.
Make sure that that's no longer necessary by refactoring the code to
remove the define.
Benjamin Otte [Sun, 11 Jun 2023 01:01:04 +0000 (03:01 +0200)]
vulkan: Do intersection check for every node
This is more expensive, but it finds more cases, and in particular it
catches corner cases like empty nodes or fully clipped nodes that might
otherwise make the kernel throw signals in our direction.
Benjamin Otte [Sun, 11 Jun 2023 00:56:50 +0000 (02:56 +0200)]
vulkan: Handle empty rects in intersects_rect()
Apart from the none case, this was already handled, so we just check if
the rect is empty now.
Benjamin Otte [Sat, 26 Dec 2020 13:55:41 +0000 (14:55 +0100)]
mediafile: Load extension at startup with GTK_MEDIA
When the GTK_MEDIA env var is set, check at startup that it works, not
only when the first MediaFile is instantiated.
This has the fortunate side effect that it prints help output for
GTK_MEDIA=help at startup, too.
Matthias Clasen [Sat, 10 Jun 2023 20:29:45 +0000 (20:29 +0000)]
Merge branch 'fontchooser-a11y' into 'main'
button: Improve accessible setup
See merge request GNOME/gtk!6081
Alice Mikhaylenko [Sat, 10 Jun 2023 20:02:15 +0000 (00:02 +0400)]
menubutton: Horizontally expand child
Set hexpand on the outer box so we don't propagate that expand.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5883
Alice Mikhaylenko [Sat, 10 Jun 2023 20:01:19 +0000 (00:01 +0400)]
menubutton: Normalize label layout
- Remove unnecessary halign=center and hexpand=0 dance
- Set hexpand=false on the outer box so we don't propagate hexpand
Benjamin Otte [Sat, 10 Jun 2023 18:51:05 +0000 (18:51 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
testsuite: Add another test to the listitemmanager
See merge request GNOME/gtk!6083
Benjamin Otte [Sat, 10 Jun 2023 18:20:51 +0000 (20:20 +0200)]
listitemmanager: All sections without widgets are unmatched
We were failing to mark sections when both the start and end of the
untracked area fell on a section boundary.
Fixes testsuite failure in
https://gitlab.gnome.org/GNOME/gtk/-/jobs/
2878290
Benjamin Otte [Sat, 10 Jun 2023 18:20:10 +0000 (20:20 +0200)]
testsuite: Print update after changes, not before
This way, we don't do an empty print at the start and don't miss a print
at the end.
Benjamin Otte [Sat, 10 Jun 2023 18:19:19 +0000 (20:19 +0200)]
testsuite: Check that removing listitem trackers works properly
We remove them at the end, so just to be sure, check again.
(Guess if I added this check because removing failed.)
Benjamin Otte [Sat, 10 Jun 2023 18:12:11 +0000 (20:12 +0200)]
testsuite: Add another test to the listitemmanager
Ensure the itemmanager doesn't lose any widgets by ensuring that the
tiles with widgets do account for all children of the list widget.
Matthias Clasen [Sat, 10 Jun 2023 17:59:32 +0000 (13:59 -0400)]
colorchooser: Improve accessibility
Set up missing accessible relations, labels and roles.
Matthias Clasen [Sat, 10 Jun 2023 16:15:20 +0000 (16:15 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
inspector: Fix an oversight
See merge request GNOME/gtk!6082
Matthias Clasen [Sat, 10 Jun 2023 15:00:35 +0000 (11:00 -0400)]
fontchooser: Improve accessibility
Set up missing accessible relations, labels and roles.
Matthias Clasen [Sat, 10 Jun 2023 14:25:02 +0000 (10:25 -0400)]
button: Improve accessible setup
With the current approach, we get duplicate labels
in the accessible name: _Cancel Cancel. Change things
around to always set the labelled-by accessible relation
if we have a label, and not the label accessible property.
Matthias Clasen [Sat, 10 Jun 2023 14:26:25 +0000 (10:26 -0400)]
inspector: Fix an oversight
There is no margin property, so don't set it.
Matthias Clasen [Sat, 10 Jun 2023 13:33:10 +0000 (13:33 +0000)]
Merge branch 'textview-ctrl-backspace' into 'main'
textview: Improve word navigation
Closes #737
See merge request GNOME/gtk!6080
Matthias Clasen [Sat, 10 Jun 2023 13:03:10 +0000 (09:03 -0400)]
textview: Improve word navigation
Both Ctrl-Left and Ctrl-Backspace were failing
to step over a non-word at the beginning of
the line. Fix this to match GtkEntry behavior.
Fixes: #737
Matthias Clasen [Sat, 10 Jun 2023 11:03:02 +0000 (11:03 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Change sidebar tab behavior
Closes #3543
See merge request GNOME/gtk!6079
Matthias Clasen [Sat, 10 Jun 2023 04:02:29 +0000 (00:02 -0400)]
gtk-demo: Change sidebar tab behavior
Change the sidebar to use the 'item' tab
behavior.
Fixes: #3543
Matthias Clasen [Sat, 10 Jun 2023 03:14:03 +0000 (23:14 -0400)]
testsuite: More memleak fixes
Matthias Clasen [Sat, 10 Jun 2023 03:13:26 +0000 (23:13 -0400)]
builder: Cosmetics
Matthias Clasen [Sat, 10 Jun 2023 03:17:14 +0000 (03:17 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
inspector: Cosmetics
See merge request GNOME/gtk!6078
Matthias Clasen [Sat, 10 Jun 2023 02:30:01 +0000 (22:30 -0400)]
gtk: Plug a memory leak
Matthias Clasen [Sat, 10 Jun 2023 02:23:06 +0000 (22:23 -0400)]
gsk: Fully free mask nodes
We were forgetting to chain up in finalize. Oops
Matthias Clasen [Sat, 10 Jun 2023 01:54:16 +0000 (21:54 -0400)]
gsk: Plug a memory leak
Matthias Clasen [Fri, 9 Jun 2023 14:59:47 +0000 (10:59 -0400)]
testsuite: Plug some memory leaks
Matthias Clasen [Sat, 10 Jun 2023 01:03:54 +0000 (21:03 -0400)]
inspector: Show computed values in a11y tab
Show the name and description in the a11y tab.
These are not direct property values, but computed
according to ARIA rules.
Matthias Clasen [Fri, 9 Jun 2023 20:39:42 +0000 (16:39 -0400)]
inspector: Cosmetics
Don't use technobabble like "fps overlay" in the UI.
Matthias Clasen [Fri, 9 Jun 2023 19:10:58 +0000 (19:10 +0000)]
Merge branch 'filechooser-sort-directories-first' into 'main'
FileChooser: Sort directories before files by default
See merge request GNOME/gtk!4284
Matthias Clasen [Fri, 9 Jun 2023 14:18:51 +0000 (14:18 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Avoid deprecation warnings from GTK_ALIGN_BASELINE_FILL
Closes #5875
See merge request GNOME/gtk!6077
Matthias Clasen [Fri, 9 Jun 2023 12:28:36 +0000 (08:28 -0400)]
Fix some typos in gtk.supp
Actually ignore the media module leak.
Matthias Clasen [Fri, 9 Jun 2023 12:23:09 +0000 (08:23 -0400)]
print: Drop one use of private api
We added public api for the foreground color
for just this case, so use it.
Matthias Clasen [Fri, 9 Jun 2023 12:12:56 +0000 (08:12 -0400)]
gdk: Fix an oversight in GdkContentFormats
When clearing a builder, reset the counts to 0.
Otherwise valgrind spots uninitialized memory
use in our testsuite.
Matthias Clasen [Fri, 9 Jun 2023 10:39:02 +0000 (06:39 -0400)]
Avoid deprecation warnings from GTK_ALIGN_BASELINE_FILL
We have to be careful to only use GDK_ALIGN_BASELINE_FILL when
permitted by GDK_VERSION_MAX_ALLOWED because gtkenums.h is a
public header.
Fixes: #5875
I don't think we can avoid conditional compilation here, because the old definition is going to cause deprecated declaration warnings unless you define an old GDK_VERSION_MIN_REQUIRED.
Daniel Boles [Fri, 9 Jun 2023 12:02:40 +0000 (13:02 +0100)]
DrawingArea: Document Widget.get_color, !StyleCont
StyleContext is deprecated. To just get foreground colour we now have a
method on Widget, so use that in this example, instead of StyleContext.
Piotr Drąg [Fri, 9 Jun 2023 11:22:17 +0000 (13:22 +0200)]
Update POTFILES.in and POTFILES.skip
Benjamin Otte [Fri, 9 Jun 2023 00:47:26 +0000 (00:47 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
testsuite: Set GIO_USE_VFS=local everywhere
See merge request GNOME/gtk!6076
Matthias Clasen [Fri, 9 Jun 2023 00:32:45 +0000 (00:32 +0000)]
Merge branch 'print-subdir' into 'main'
Move printing code to its own directory
See merge request GNOME/gtk!6067
Benjamin Otte [Fri, 9 Jun 2023 00:26:18 +0000 (02:26 +0200)]
testsuite: Set GIO_USE_VFS=local everywhere
And do so centrally, not randomly in individual tests.
(Hopefully) fixes spurious test failures in CI.
Related: #5867
Benjamin Otte [Thu, 8 Jun 2023 23:54:07 +0000 (23:54 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
testsuite: Make memorytexture tests random
See merge request GNOME/gtk!6075
Matthias Clasen [Thu, 8 Jun 2023 04:24:38 +0000 (00:24 -0400)]
print: Reimplement collate preview
Redo this with widgets instead of cairo drawing.
The new private widget is called GtkPageThumbnail.
Matthias Clasen [Thu, 8 Jun 2023 04:02:05 +0000 (00:02 -0400)]
print: Drop some private api use
Matthias Clasen [Thu, 8 Jun 2023 03:47:34 +0000 (23:47 -0400)]
Move resources too
Benjamin Otte [Thu, 8 Jun 2023 23:09:52 +0000 (01:09 +0200)]
testsuite: Don't always loop in memorytexture tests
When running the tests, only run the random (and potentially large) size
download test once instead of 10 times.
There's no real benefit in doing that, both because it's unlikely to
fail only in the 2nd or 9th run and because the sizes are picked
randomly.
This also speeds up the test massively as the download test was
dominating the runtime.
Benjamin Otte [Thu, 8 Jun 2023 23:04:27 +0000 (01:04 +0200)]
testsuite: Make memorytexture tests random
Instead of picking a few numbers in advance and running them through the
test gauntlet every time, pick the random numbers at runtime.
This both increases the test coverage in that it ultimately tests more
combinations across many runs and it reduces the runtime of individual
runs because every tun only runs the download tests twice (with 1px and
the random size) instead of 5 times.
And that speedup benefits the CI, where the asan runs would cause this
test to timeout sometimes.
Benjamin Otte [Thu, 8 Jun 2023 21:57:07 +0000 (21:57 +0000)]
Merge branch 'wip/otte/for-vulkan' into 'main'
vulkan: Fancy gradients
See merge request GNOME/gtk!6073
dgsasha [Tue, 30 May 2023 00:11:44 +0000 (20:11 -0400)]
win32: Center newly created transient windows
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5407
Benjamin Otte [Thu, 8 Jun 2023 19:42:18 +0000 (21:42 +0200)]
vulkan: Antialiasing for linear gradients
Shaders are complicated now...
Benjamin Otte [Thu, 8 Jun 2023 10:52:33 +0000 (12:52 +0200)]
testsuite: Add a test for repeating gradients
Make sure scaling the image also scales the color stop lookup.
Benjamin Otte [Thu, 8 Jun 2023 10:03:48 +0000 (12:03 +0200)]
vulkan: Make gradient shader use buffers
This allows putting any number of color stops into the buffer, so
fallbacks with too many stops are no longer necessary.
Benjamin Otte [Thu, 25 May 2023 20:21:23 +0000 (22:21 +0200)]
vulkan: Add support for storage buffers
And add a default storage buffer that is used for per-frame temporary
data.
So far nothing is using this code, this is just infrastructure.
Benjamin Otte [Thu, 8 Jun 2023 09:00:18 +0000 (11:00 +0200)]
vulkan: Switch GLSL version to 450
We need more modern features soon.
Benjamin Otte [Thu, 8 Jun 2023 04:55:40 +0000 (06:55 +0200)]
vulkan: Only update descriptor sets with contents
If one of the descriptor sets doesn't have any items, don't include it
in the sets passed to vkUpdateDescriptorSets().
This has no effect right now, because we either have both images and
samplers or neither, but it will become relevant once we also support
buffers.
Matthias Clasen [Wed, 7 Jun 2023 19:35:12 +0000 (15:35 -0400)]
print: Some more include cleanup
Matthias Clasen [Wed, 7 Jun 2023 18:41:46 +0000 (14:41 -0400)]
Update POTFILES.in
The moving the printing sources needs to
be reflected here.
Matthias Clasen [Wed, 7 Jun 2023 15:11:29 +0000 (15:11 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
Fix a compiler warning
See merge request GNOME/gtk!6070
Matthias Clasen [Wed, 7 Jun 2023 14:54:48 +0000 (10:54 -0400)]
ci: Mark asan as must-pass
The asan test run seems to pass pretty
reliably now, so lets keep it that way.
Matthias Clasen [Wed, 7 Jun 2023 11:41:30 +0000 (07:41 -0400)]
Fix a compiler warning
Compilers these days are very picky about
their NULLs.
Benjamin Otte [Wed, 7 Jun 2023 14:21:32 +0000 (14:21 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
gtk-demo: Remove random numbers
See merge request GNOME/gtk!6069
Benjamin Otte [Wed, 7 Jun 2023 13:55:59 +0000 (15:55 +0200)]
gtk-demo: make the sidebar request proper width
- 25 chars sounds about right for the texts we use
- don't use min width so we allow shrinking the widget (large text or
small mobile devices)
- ellipsize the text instead of clipping it.
Benjamin Otte [Wed, 7 Jun 2023 13:54:53 +0000 (15:54 +0200)]
gtk-demo: Remove random numbers
There were 3 different random numbers set to determine the sidebar width
and all of them were wrong. Remove them.
Instead, propagate the natural width of the listitems.
Matthias Clasen [Wed, 7 Jun 2023 11:41:30 +0000 (07:41 -0400)]
Fix a compiler warning
Compilers these days are very picky about
their NULLs.
Matthias Clasen [Wed, 7 Jun 2023 11:27:03 +0000 (07:27 -0400)]
Make introspection build
Matthias Clasen [Wed, 7 Jun 2023 04:29:39 +0000 (00:29 -0400)]
print: Maintain compatibility
gtkunixprint.h is a public header, that needs
to keep being installed in the same location.
Matthias Clasen [Wed, 7 Jun 2023 03:35:07 +0000 (23:35 -0400)]
print: Start sorting apart includes
Use gtk/gtk.h in the print sources, so that it
becomes apparent where we are using private apis.