Commit Graph

80006 Commits

Author SHA1 Message Date
Jie Liu
63d38c0cc2 Ignore grabbing tablet devices without pads or tools
Signed-off-by: Jie Liu <liujie01@kylinos.cn>
2024-07-25 13:20:19 +03:00
Christian Hergert
9a1eb3eb61 columnview: check column visibility when measuring
We only want to measure visible columns so that they may consume the
maximum width available to the widget. This fixes a situation where hidden
columns would cause less-than the whole width to be allocated. Additionally
that fixes warnings where some widgets expect more horizontal space than
they would ultimately be allocated.
2024-07-25 13:20:19 +03:00
Balló György
bafc36aca6 Add missing icon
The fullcolor 'document-save' icon is used in the print dialog for the
'Print to File' element.
2024-07-25 13:20:19 +03:00
Matthias Clasen
54980e2b45 expander: Don't leave dangling a11y relations
If we unparent the widget, we should sever a11y relations too.
Otherwise, an a11y implementation might follow them and be surprised
to find a parentless widget (and not in a good way).

Updated tests to not check the relation on an unexpanded expander.
2024-07-25 13:20:19 +03:00
Matthias Clasen
f424b6bdf1 gsk: Avoid a crash
The subsurface in subsurface nodes can be NULL, so check before
poking at it.
2024-07-25 13:20:19 +03:00
Matthijs Velsink
90803c52e3 popover: Fix invalid width/height check in layout
Commit a4cc95b2 introduced a check in layout() that closes the popover
if the width or height is smaller than the minimum width or height,
respectively. However, that was using gtk_widget_get_preferred_size(),
which finds out the minimum height for the minimum width and vice versa,
but not the minimum height for the layout width and vice versa. So,
certain popovers were not showing, even though they would not have
generated a critical to begin with.

To fix this, we copy the logic from gtk_widget_allocate() that generates
the criticals, and use that to check if we have a good width/height for
the popover native or not.

Closes #6826
2024-07-25 13:20:19 +03:00
Matthijs Velsink
0e13ef1f00 popover: Take shadow size into account in measure
Commit b9487997 introduced shadows for GtkPopover. These are correctly
subtracted while allocating the child widget, but the child is not
measured with those shadows subtracted (as is correctly done for the
arrow). This can give criticals, for example with some wrapping labels.

To fix this, we subtract the shadow size from the `for_size` before
passing it to the measure() of the child widget.

Closes #5782
Fixes #6796
2024-07-25 13:20:19 +03:00
Matthias Clasen
2e9785db8a snapshot: Don't crash and don't leak
We were trying to handle a NULL mask child, unsuccessfully.

Pointed out by Niels De Graef.
2024-07-25 13:20:19 +03:00
Matthias Clasen
acbddd6634 dnd: Avoid a critical
There is no way for callers of this function to find out if
the drop is still the same, so spewing a critical if it isn't
seems useless. Just quietly do nothing.
2024-07-25 13:20:19 +03:00
Matthias Clasen
aecf2011df popover: Hide if we don't get enough size
If the compositor does not give us our min size, we have to
disappear, or we risk criticals from underallocating widgets.
2024-07-25 13:20:19 +03:00
Fabio Lagalla
ca36537f14 gdk: Implement fullscreen on selected monitor on macos
The feature was apparently missing, as monitors were always fullscreened at the surface best monitor.

Keep using best monitor if the selected monitor is not specified, otherwise move the window to the selected monitor before going fullscreen.
2024-07-25 13:20:19 +03:00
Matthias Clasen
97e3b55712 popover: Recompute shape more often
We want to recompute the shape when the attachment position has
changed, since that might require the arrow to be repositioned.
2024-07-25 13:20:19 +03:00
cameron
ef21b56e30 Fix Harfbuzz subset dependency not found in wrap
Add harfbuzz subset to the harfbuzz wrap file so Meson can find the
dependency.
2024-07-25 13:20:19 +03:00
Matthias Clasen
605b11cdb6 wayland: Add missing listeners
Now that we are using version 6 of the compositor interface,
we need to have preferred scale and bufer transform callbacks
everywhere.
2024-07-25 13:20:19 +03:00
gayathri.berli@ibm.com
4aabd7a402 changes to fix the memorytexture regression 2024-07-25 13:10:30 +03:00
g.willems
ca78d245c7 range: fix highlight clipping
Clipping on padding box prevents the scale highlight to fully paint itself
over the scale trough, including its border.
Use the border box instead.

Fixes #6332
2024-07-25 13:10:30 +03:00
g.willems
f886aa3ac3 progressbar: fix highlight clipping
Clipping using OVERFLOW_HIDDEN relies on widget's padding box.
This prevents the highlight to paint itself over the trough's borders.

Use the border box instead, with a custom snapshot implementation.

Fixes #6332
2024-07-25 13:10:30 +03:00
Benjamin Otte
2746d3386d testsuite: Shrink maximum texture size in test
1MB textures can lead to 20s runtimes - which with asan CI being a lot
slower can be a loooong time and cause timeouts.

Limiting them to 16kB still allows hitting max texture size sometimes
but makes sure the test only runs for 3-4s worst case.
I hope that doesn't trigger timeouts even under asan.
2024-07-25 13:10:30 +03:00
Georges Basile Stavracas Neto
aaba54051f filechooserwidget: Plug a bunch of GtkBitset leaks
gtk_selection_model_get_selection() is transfer full, and the returned
bitset must be freed by the caller. GtkFileChooserWidget freed none of
them.

Unref the bitsets.

Related: https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/91
2024-07-25 13:10:30 +03:00
g.willems
6a6da0ba81 win32: Guarantee dnd-move as a cursor name
gdk currently falls back to the default cursor, which may not be
approriate for rendering a DnD move.
2024-07-25 13:10:30 +03:00
Alice Mikhaylenko
ac25e96aa1 spinner: Only set :checked state when mapped
Avoid doing the animation while it's invisible.

See https://gitlab.gnome.org/GNOME/gtk/-/issues/1025
2024-07-25 13:10:29 +03:00
Benjamin Otte
c459af78ff vulkan: Add a missing extension
We need to enable this one, too.

Thanks validation layers!
2024-07-25 13:10:29 +03:00
Dr. David Alan Gilbert
3a9bd9bd8a gdk: Remove unused struct 'XPointerUngrabInfo'
'XPointerUngrabInfo' appears unused since
commit 26cbf87d7d ("New approach for grab tracking code")
Remove it.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
2024-07-25 13:10:29 +03:00
Lukáš Tyrychtr
81e10228fe a11y: Realize the AT context before firing a children added event for it
This allows, with some other changes, AdwToasts to be read on appearance by Orca.
2024-07-24 14:59:23 +03:00
Benjamin Otte
eee0b1ecdd dmabuf: Ref previous context
In case the context's only reference was held by being the current
context, setting the new context would free it.

Resetting it later would then be a use-after-free.

Fixes #6694
2024-07-24 14:58:50 +03:00
Doğukan Korkmaztürk
7a3c6b77ef vulkan: Recreate swapchain when it is necessary or beneficial
Currently, GTK does not check the result of vkAcquireNextImageKHR() and
assumes that it always succeeds. As a result, the vkQueuePresentKHR() is
unconditionally set to wait for the semaphore passed to
vkAcquireNextImageKHR() earlier.

However, if vkAcquireNextImageKHR() fails for some reason, the semaphore
passed to it does not get signalled. This causes the presentation
command to wait for the semaphore to be signalled indefinitely, which
causes GTK to hang.

This change adds error handling around vkAcquireNextImageKHR() to make
GTK recreate the Vulkan swapchain when it is necessary or beneficial and
helps avoiding situations that could cause indefinite waits.
2024-07-24 14:58:27 +03:00
Georges Basile Stavracas Neto
85da031684 gtk-demo: Remove set-but-unused variable 2024-07-24 14:55:40 +03:00
Georges Basile Stavracas Neto
11381d8e64 win32/vulkancontext: Remove unused variable
Silences a compiler warning.
2024-07-24 14:54:54 +03:00
Georges Basile Stavracas Neto
f1d4cf9760 win32/wgl: Initialize hwnd to NULL
Otherwise there's a valid code path that may return it uninitialized.
2024-07-24 14:54:43 +03:00
Georges Basile Stavracas Neto
e9a35fe3f5 win32/cursor: Ignore GdkPixbuf deprecation warning
Seems harmless to ignore this for now, other bits of code also ignore
this.
2024-07-24 14:54:18 +03:00
Robert Ancell
ca1bb23edc glcontext: Remove duplicate check for GL version 2024-07-24 14:52:29 +03:00
Michael Weghorn
4061e9ed92 a11y atspi: Improve mapping for container roles
GTK_ACCESSIBLE_ROLE_GENERIC is for
"a nameless container that has no semantic meaning of its own",
for which AT-SPI role ATSPI_ROLE_PANEL [1]
("A generic container that is often used to group
objects.") fits better than ATSPI_ROLE_FILLER
("A object that fills up space in a user interface."),
so map to this one.

With this in place, widgets like GtkBox are again
reported with the panel role on AT-SPI level after
commit a86923de94
("a11y: Change the role for many containers"),
whose commit message suggests that the change
on the AT-SPI level was unintended.

For GTK_ACCESSIBLE_ROLE_GROUP, use the corresponding
ATSPI_ROLE_GROUPING ("A group of related widgets.
This group typically has a label.").

[1] https://docs.gtk.org/atspi2/enum.Role.html
2024-07-24 14:50:25 +03:00
Chao-Hsiung Liao
7b4780e2aa Update Chinese (Taiwan) translation 2024-07-16 13:01:10 +00:00
Pawan Chitrakar
d4a57811c7 Update Nepali translation 2024-07-14 07:40:45 +00:00
Pawan Chitrakar
4c97bde1ef Update Nepali translation 2024-07-11 09:52:13 +00:00
Chao-Hsiung Liao
25ac3c42e6 Update Chinese (Taiwan) translation 2024-07-08 22:56:49 +00:00
Danial Behzadi
74f368bc02 Update Persian translation 2024-06-28 22:10:17 +00:00
Matthias Clasen
0b3520049d Merge branch 'null-tile-cherry-pick-4-14' into 'gtk-4-14'
Cherry-pick Empty Listbase Crash Fix to 4.14

See merge request GNOME/gtk!7381
2024-06-27 01:22:33 +00:00
Matthias Clasen
e59c462f27 Merge branch '4-14-no-c-format' into 'gtk-4-14'
gtkfilechooserwidget: Mark string as no-c-format

See merge request GNOME/gtk!7377
2024-06-27 00:11:31 +00:00
Benjamin Otte
de52518018 columnview: Actually check the listview in return_if_fail()
This was missed when adding return_if_fail()s in
172cdf8e21.

Related: !7240
2024-06-25 23:50:33 +03:00
Khalid Abu Shawarib
bf47031699 listbase: Return early on non-existent scroll position 2024-06-25 23:50:30 +03:00
Anders Jonsson
a258f2b993 gtkfilechooserwidget: Mark string as no-c-format
gettext 0.22 recognizes %b as a C string format which
not is true for date strings, so explicitly mark as
no-c-format.

(cherry picked from commit 5df9b1cb5b)
2024-06-23 06:43:44 +02:00
Милош Поповић
0d007345b8 Update Serbian translation 2024-06-20 17:40:22 +00:00
Fran Dieguez
29bbd1f329 Update Galician translation 2024-06-11 21:00:59 +00:00
Rachida SACI
1892761b46 Update Kabyle translation 2024-06-07 02:24:11 +00:00
Matthias Clasen
b237d76b1a Merge branch 'michaelweghorn/gtk-4-14_a11y_label_name' into 'gtk-4-14'
a11y: Use text instead of label for GtkLabel's a11y name [GTK 4.14 backport]

See merge request GNOME/gtk!7317
2024-05-31 20:00:04 +00:00
Michael Weghorn
3143ab887e a11y: Use text instead of label for GtkLabel's a11y name
Update the `GTK_ACCESSIBLE_PROPERTY_LABEL` property
in `gtk_label_set_text_internal` using the new text
instead of using the label in
`gtk_label_set_label_internal`.

While the `label` "includes any embedded underlines
indicating mnemonics and Pango markup" [1], the
`text` is the "text is as it appears on screen" [2],
which is more suitable for the accessible name.

With this in place, the text is reported as the
accessible name again after

    commit d5b34aecdd
    Date:   Wed Jan 17 12:49:38 2024 +0100

        a11y: Remove special handling of accessible names for static text widgets

[1] https://docs.gtk.org/gtk4/method.Label.get_label.html
[2] https://docs.gtk.org/gtk4/method.Label.get_text.html

Fixes: #6732
Fixes: #6735
(cherry picked from commit 317e68a58c)
2024-05-30 07:55:44 +02:00
Matthias Clasen
1dbea91db4 Merge branch 'wip/xdg-dialog-4-14' into 'gtk-4-14'
gdk/wayland: Implement support for xdg-dialog Wayland protocol [4.14]

See merge request GNOME/gtk!7256
2024-05-29 23:16:34 +00:00
Matthias Clasen
355a9f4d13 Merge branch 'gtk-4-14-backports' into 'gtk-4-14'
[4.14] macOS backports

See merge request GNOME/gtk!7292
2024-05-29 23:14:49 +00:00
Matthias Clasen
0512da0ad4 Merge branch 'windows-fixes-backport' into 'gtk-4-14'
Backport: 32-bit Windows build and runtime fixes for NGL and Vulkan

See merge request GNOME/gtk!7307
2024-05-29 20:39:14 +00:00