Commit Graph

79917 Commits

Author SHA1 Message Date
Matthias Clasen
e10f26fc8a docs: Clarify the cairo interaction section
This was giving outdated advice.
2024-05-01 20:51:58 -04:00
Matthias Clasen
d09a678165 Speed up symbolic svg loading
If the svg doesn't use the symbolic style classes, we can avoid
loading it multiple times.

This brought the time for loading system-run-symbolic at 256@2
from 6.8ms down to 2ms.
2024-05-01 20:51:58 -04:00
Matthias Clasen
378758e68b Reencode all our symbolic pngs
This adds the only-foreground information and will let us use
these symbolics more efficiently.
2024-05-01 20:51:58 -04:00
Matthias Clasen
64923b3e60 Add 'only foreground' to texture utility api
Add an 'only_fg' argument to all our internal texture utility
api, so GtkIconTheme can find out if a symbolic png or svg uses
colors beyond the foreground or not.

This information is used in gtk_symbolic_paintable_snapshot_symbolic
to optimize rendering of such symbolic icons.
2024-05-01 20:51:58 -04:00
Matthias Clasen
dd91a70241 loaders: Make it possible to load png options
We want to store some metadata in our symbolic pngs, so make it
possible to get options when loading a png, along with the texture.

Update all callers.
2024-05-01 20:51:58 -04:00
Matthias Clasen
8f335ee14a Small optimization
Avoid copying a potentially large blob more than necessary.
2024-05-01 20:51:58 -04:00
Joshua Lee
b46dfb84e5 path builder: Fix doc typo 2024-05-01 20:51:58 -04:00
Benjamin Otte
90ca47464a reftests: Use longer words when testing wrapping
"Hello" might be shorter than "Hi Ho" in some fonts and then that one
gets wrapped, too.

So choose perfectly cromulent words for this purpose instead.
2024-05-01 20:51:58 -04:00
Benjamin Otte
73d46edf73 glcontext: Split dmabuf import codepaths
Use different codepaths for known formats vs unknown formats.

Be more careful with unknown formats and always import them as
GL_TEXTURE_EXTERNAL_OES when possible (GL can't do EXTERNAL) to avoid
problems.

This is a more defensive approach towards older drivers that don't
support modifiers.

This fixes importing YUV textures on AMD Gen8.

Another approach would be to check for YUV and never try
GL_TEXTURE_2D with them, but I decided to go this way first.

Fixes #6668
2024-05-01 20:51:58 -04:00
Benjamin Otte
b0f305e6ba gpu: Handle tiny offscreens
Due to rounding errors, it is possible after intersecting a lot of
rectangles to end up with a tiny size for an offscreen. And because we
allow an epsilon before ceil()ing to an integer (see commit afc7b46264
for details) it is now possible that we end up with a size of 0.

Avoid that by always enforcing a minimum size of 1px.

Test included

The test uses a different codepath to arrive at the same problem - it
specifies the small size instead of triggering it via rounding errors
and clipping like the original bug (and most likely the more common case
to encounter this problem.

Fixes #6656
2024-05-01 20:51:58 -04:00
Benjamin Otte
179c696405 path: document enum 2024-05-01 20:51:58 -04:00
Matthias Clasen
d33daf311c atcontext: Add a few missing values
Add a missing value to the naming array, and sort the recent additions
alphabetically.

Fixes: #6575
2024-05-01 20:51:58 -04:00
Matthias Clasen
0aef967f31 label: Report errors
Print a warning when launching a handler fails.
2024-05-01 20:51:58 -04:00
Matthias Clasen
9a95f45416 linkbutton: Report errors
Print a warning when launching a handler fails.

Fixes: #6446
2024-05-01 20:51:58 -04:00
Matthias Clasen
4e44b78a20 listview: Fix some oversights
The list factory widget was notifying the wrong properties.
2024-05-01 20:51:58 -04:00
Matthias Clasen
a1537e608e gsk: Add a warning for inefficient texture import
With GSK_DEBUG=fallback, warn if a non-memory texture has to be
downloaded for importing it into Vulkan or GL.
2024-05-01 20:51:58 -04:00
Sebastian Dröge
aa90a3cb94 Don't crash if snapshotting a GtkGraphicsOffload without child 2024-05-01 20:51:58 -04:00
Chun-wei Fan
23a046c1f8 gskvulkandescriptors.c: Don't return value from void-rettype function
Fixes builds on Visual Studio with Vulkan enabled, as later GLib releases
consider this as an error on Visual Studio builds.
2024-05-01 20:51:58 -04:00
Chun-wei Fan
43910ae33c GStreamer media backend: Fix building and running on Windows
Visual Studio (and possibly other non-GCC compilers) do not like
uses of #-preprocessor directives in macro usage (warning C5101: use of
preprocessor directive in function-like macro argument list is undefined
behavior is also shown), so fix the build by defining another macro
accordingly.
2024-05-01 20:51:58 -04:00
Matthias Clasen
10345e134f macos: Respect the default-settings debug key
This makes our behavior more consistent across platforms.
The suggestion came up in discussion in #6545.
2024-05-01 20:51:58 -04:00
Sebastian Wick
830ba15ab7 gdk: Consider XDG_ACTIVATION_TOKEN for the startup notification id
We prefer it over the old DESKTOP_STARTUP_ID environment variable if we
have it and it is valid.

We have to stash and unset XDG_ACTIVATION_TOKEN in addition to
DESKTOP_STARTUP_ID now as well. This makes sure that we don't call any
library functions which might rely on some environment variables. This
way unsetting the environment variables is safe and we can then
afterwards validate and print warnings.
2024-05-01 20:51:58 -04:00
Alice Mikhaylenko
2da17eede2 csstokenizer: Fix an out of bounds when reading an ident followed by EOF 2024-05-01 20:51:58 -04:00
Matthias Clasen
d4ed30bacc testsuite: Fix another ubsan warning
The expression here was a bit too dense for ubsan to figure out
what branches aren't hit.
2024-05-01 20:51:58 -04:00
Matthias Clasen
5118324c03 lsan: Don't suppress glib and gio leaks
These are useful to see and not all that common.
2024-05-01 20:51:58 -04:00
Matthias Clasen
40d55cb4a7 gtk: Fix more ubsan warnings
Most of these are calling a get_instance_private() function before
checking that the object isn't NULL.
2024-05-01 20:51:58 -04:00
Matthias Clasen
176a34ea9c wayland: Fix an ubsan warning
dev_t requires 8-byte alignment, so we need to use memcpy.
2024-05-01 20:51:58 -04:00
Matthias Clasen
e6cff9d7c5 inspector: Fix an ubsan warning
These values are too big for int, so cast them to double.
2024-05-01 20:51:58 -04:00
Matthias Clasen
e117f6abb5 roaring: Fix some ubsan warnings
Avoid warnings about memcpy (NULL, NULL, 0).
2024-05-01 20:51:58 -04:00
Rachida SACI
fa15170fd4 Update Kabyle translation 2024-05-01 14:56:18 +00:00
Artur S0
ad1103ee0d Update Russian translation 2024-04-29 11:55:14 +00:00
Christian Kirbach
3aefbef59a Update German translation 2024-04-28 19:03:21 +00:00
Matthias Clasen
4e34059e52 Merge branch 'amolenaar/macos-event-propagation-backport' into 'gtk-4-14'
[backport] macos: Avoid repeatedly sending events back to macOS

See merge request GNOME/gtk!7182
2024-04-26 18:28:32 +00:00
Arjan Molenaar
df9a90a83a macos: Add some docs for the different NSEvent getters 2024-04-25 19:16:37 +02:00
Arjan Molenaar
1af4a47491 macos: fix in-app native shortcuts (again)
Popping an event of the queue in the IMContext handler
prevents it from being forwarded to the NSApp, in case the
(key) event was not handled by IMContext.

So I reverted to a mix of the original (4.13) and new (4.14.1) behavior
for fetching events: NSEvent lookup for IMContext uses loose matching,
so it can work with rewritten events. When sending events to NSApp, only
we're checking for an exact match.

Now in-app keyboard shortcuts (e.g. Ctrl-F2) work from within text
fields again.
2024-04-25 19:16:11 +02:00
Arjan Molenaar
79451fcb72 macos: Avoid repeatedly sending events back to macOS
in the old approach it was possible that one NSEvent was
sent to the underlying NSApp multiple times. This resulted in
those events being forwarded to our (glib) event queue again.

The visual result was that no screen updates were done. Under the hood
the application was very busy with passing events around.

By popping the events off of our event queue, we make sure they're sent
only once.
2024-04-25 19:15:45 +02:00
Benjamin Otte
88586e27a3 Merge branch 'cherry-pick-e9dcf816' into 'gtk-4-14'
vulkan/image: Use GENERAL for initial layout of DMA-BUF textures

See merge request GNOME/gtk!7180
2024-04-24 21:53:29 +00:00
Benjamin Otte
5d6e74357c Merge branch 'gbsneto/vulkan-dmabuf-general' into 'main'
vulkan/image: Use GENERAL for initial layout of DMA-BUF textures

See merge request GNOME/gtk!7179

(cherry picked from commit e9dcf8167c)

3aa6c27c vulkan/image: Use GENERAL for initial layout of DMA-BUF textures
2024-04-24 20:57:33 +00:00
Changwoo Ryu
e1dafd7a5d Update Korean translation 2024-04-23 11:33:38 +00:00
Andika Triwidada
66de0cddfa Update Indonesian translation 2024-04-23 07:25:55 +00:00
Luca Bacci
74abebb214 Merge branch 'backport-win32-fixes' into 'gtk-4-14'
[4.14] GdkWin32: Remove some work arounds that are not needed anymore

See merge request GNOME/gtk!7156
2024-04-22 13:22:36 +00:00
Matthias Clasen
680de2d8ad Merge branch 'gtk-4-14-backports' into 'gtk-4-14'
docs: Improve a reference

See merge request GNOME/gtk!7163
2024-04-21 23:32:02 +00:00
Sebastian Dröge
161aebe09a Drop return value annotation of gtk_graphics_offload_new()
A floating reference is returned, not a full reference. By having no
annotation, like for all other widget constructors, the correct default
is used again.
2024-04-21 14:58:04 -04:00
Matthias Clasen
f0075f2ad6 docs: Improve a reference
DConf is not what we use, it is actually GSettings.

Fixes: #6635
2024-04-21 14:57:28 -04:00
Luca Bacci
64e512054c GdkWin32: Do not clear surface contents when restoring from minimize
The code does not work anyway since we dropped WS_EX_LAYERED windows.
2024-04-20 16:03:39 +03:00
Luca Bacci
cde8ceae49 GdkWin32: Don't explicitly set the transient owner as active
...when a transient child is hidden.

The system does that automatically
2024-04-20 16:03:25 +03:00
Luca Bacci
9b8826f8a7 GdkWin32: Remove some work arounds that are not needed anymore
2cc650ce was added to work around some of the regressions
introduced by 79557271, but that commit was finally reverted
in 43476c09.

We can now revert 2cc650ce as well.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/6614
2024-04-20 16:03:07 +03:00
Aurimas Černius
49046f5c34 Update Lithuanian translation 2024-04-20 10:39:32 +00:00
Matthias Clasen
2c5eb581ca Post-release version bump 2024-04-18 22:00:05 -04:00
Matthias Clasen
686a629f98 4.14.3 4.14.3 2024-04-18 21:30:02 -04:00
Andi Chandler
e26c5945a9 Update British English translation 2024-04-18 22:44:44 +00:00