Commit Graph

82026 Commits

Author SHA1 Message Date
Matthias Clasen
08238a39a2 4.16.5 4.16.5 2024-11-01 13:50:49 -04:00
Matthias Clasen
4b633cae85 Fix a compiler warning 2024-11-01 13:50:44 -04:00
Matthias Clasen
a12a68bfd6 Drop accidentally cherry-picked debug spew 2024-11-01 13:42:43 -04:00
Matthias Clasen
88d223d39e Post-release version bump 2024-11-01 08:35:27 -04:00
Matthias Clasen
047f2e5acf 4.16.4 4.16.4 2024-11-01 08:11:48 -04:00
Aurimas Černius
d09597af8c Update Lithuanian translation 2024-10-30 20:22:10 +00:00
Matthias Clasen
0ec3db415a docs: Fix a few copy-paste errors 2024-10-30 09:17:38 -04:00
Matthias Clasen
62a8f87ccc NEWS: Updates 2024-10-29 23:01:38 -04:00
Matthias Clasen
a908dff62e Merge branch 'backports-for-4-16' into 'gtk-4-16'
wayland: Use the same default cursor size as gsettings schema

See merge request GNOME/gtk!7882
2024-10-30 02:21:39 +00:00
Corey Berla
db3807ca1f printunixdialog: Set selection after list view item created
Commit b807b84e16 ("print dialog: Fix initial selection") made a
change where we connect to items-changed before the list item manager.
That leads to us attempting to set a selection for a tile that does
not yet exist.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/7109
2024-10-29 18:58:11 -04:00
Matthias Clasen
1cfef15317 textbuffer: Handle charsets in serialization
Offer and accept text/plain and other charset variations.

Fixes: #7123
2024-10-29 18:57:55 -04:00
Matthias Clasen
2e3fe41ca4 css: Avoid redundant change notification
When adding or removing css class doesn't change anything, we
should not notify the css-classes property. This is more efficient
and avoids some suboptimal behavior in the inspector.

Fixes: #7111
2024-10-29 18:57:16 -04:00
Emmanuele Bassi
e0b547b467 docs: Add some markup
Use <kbd> for keys, to improve the consistency of our docs.
2024-10-29 18:57:00 -04:00
Matthias Clasen
d26c0f6022 docs: Drop mention of X from general docs
Our docs should not allude to specifics of X11, unless they are
about the X11 backend.
2024-10-29 18:56:53 -04:00
Matthias Clasen
5797ecb1f7 application: Respect GDK_DEBUG=no-portals
If that debug flag is set, don't activate portals by talking to
the Inhibit portal.

Fixes: #7116
2024-10-29 18:56:43 -04:00
Benjamin Otte
49668a3154 wayland: Split event source into two
We need to guarantee that we call wayland_display_read_events() after a
poll() and before any other source runs, including any source with
higher priority.

As GSourceFuncs doesn't have a after_poll() vfunc and check() is not
guaranteed to be called for anything but the highest priority, we only
have once chance:
Run with the highest priority

But because we don't want event delivery with ultrahigh priority, we
split the source into two:
 * a poll source that polls while blocking wayland reading and
   then immediately calls read_events() with priority G_MININT
 * our old trusty event source with PRIORITY_EVENTS that dispatches
   events

Fixes !7859
Fixes #7091
2024-10-29 18:56:15 -04:00
Benjamin Otte
ea1ca0ed5b wayland: Move all GSource handling into gdkeventsource.c 2024-10-29 18:55:24 -04:00
Benjamin Otte
be4ccdf1e5 wayland: Remove unused variable 2024-10-29 18:55:18 -04:00
Benjamin Otte
3dd026935d wayland: Rename source functions
It's a GdkWaylandEventSource, name the function accordingly.
2024-10-29 18:55:13 -04:00
Benjamin Otte
2b642e289e Revert "wayland: Don't block the event queue"
This reverts commit a9723fc96b.

This approach was wrong as it can lead to deadlocks when multiple
threads call poll() at almost the same time and the slower thread only
starts poll()ing when the faster thread has already read the fd.

See further comments for a (hopefully) correct fix.

Reverts !7859
2024-10-29 18:55:05 -04:00
Benjamin Otte
291c7aa373 gdk: Remove unused display vfunc
But it's nice that everyone still implements it.
2024-10-29 18:54:51 -04:00
Thomas Devoogdt
ac2e3a17ce gdk/loaders/gdkjpeg.c: fix compilation on 32-bit systems
../gdk/loaders/gdkjpeg.c: In function ‘gdk_save_jpeg’:
../gdk/loaders/gdkjpeg.c:291:32: error: passing argument 3 of ‘jpeg_mem_dest’ from incompatible pointer type [-Wincompatible-pointer-types]
  291 |   jpeg_mem_dest (&info, &data, &size);
      |                                ^~~~~
      |                                |
      |                                gulong * {aka long unsigned int *}
In file included from ../gdk/loaders/gdkjpeg.c:30:
/home/thomas/br-test-pkg/bootlin-armv7-glibc/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/jpeglib.h:979:28: note: expected ‘size_t *’ {aka ‘unsigned int *’} but argument is of type ‘gulong *’ {aka ‘long unsigned int *’}

See multiple versions:

https://www.ijg.org/files/jpegsrc.v9c.tar.gz
- #define JPEG_LIB_VERSION        90	/* Compatibility version 9.0 */
- #define JPEG_LIB_VERSION_MAJOR  9
- #define JPEG_LIB_VERSION_MINOR  3
- EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
			       unsigned char ** outbuffer,
			       unsigned long * outsize));

https://www.ijg.org/files/jpegsrc.v9d.tar.gz
- #define JPEG_LIB_VERSION        90	/* Compatibility version 9.0 */
- #define JPEG_LIB_VERSION_MAJOR  9
- #define JPEG_LIB_VERSION_MINOR  4
- EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
			       unsigned char ** outbuffer,
			       size_t * outsize));

https://github.com/libjpeg-turbo/libjpeg-turbo/blob/3.0.4/jpeglib.h
https://github.com/libjpeg-turbo/libjpeg-turbo/blob/3.0.4/jconfig.h.in
- #define LIBJPEG_TURBO_VERSION  @VERSION@
- EXTERN(void) jpeg_mem_dest(j_compress_ptr cinfo, unsigned char **outbuffer,
                           unsigned long *outsize);

The jpegsrc changed the method signature with the v9d release,
libjpeg-turbo did not changed it's signature (yet).

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
2024-10-29 18:54:41 -04:00
Віктар Гаўрылавец
cc92230f56 Update Belarusian translation 2024-10-24 16:41:22 +00:00
Matthias Clasen
aa9e012078 Merge branch 'backports-for-4-16' into 'gtk-4-16'
Various backports

See merge request GNOME/gtk!7861
2024-10-23 13:58:14 +00:00
Christian Hergert
3bd4eef726 gtk/textlayout: remove one_style_cache
When porting textlayout to GTK 4 a line display cache was introduced. That
cache creates a situation where you may not create GtkTextLineDisplay in
order from GtkTextLineSegment.

Because of that, we must start the creation of each line display from
fresh line state or we could re-apply the GtkTextAppearance of another
row. However, once you do that, one_style_cache will never have a match
and therefore is pure overhead.

This removes one_style_cache altogether.

Fixes: #7108
2024-10-23 08:19:52 -04:00
Benjamin Otte
f6faff1b13 wayland: Don't block the event queue
The Wayland source was blocking the Wayland display queue between its
check() and prepare() callbacks.

This is a rare event to cause problems because it requires
1. Another source with
2. a higher priority that
3. triggers at the same time as the Wayland source and
4. triggers a roundtrip or other operation that requires reading events
   from the display.

Introduced in commit 2893526a48 during GTK 3.21, so this should
probably be fixed in GTK3, too.

Fixes #7091
2024-10-23 08:19:44 -04:00
Emmanuele Bassi
0458e74fc6 docs: Fix typo in Gdk.ContentProvider.new_union
It's GDK_TYPE_TEXTURE, not G_TYPE_TEXTURE.

Fixes: #7106
2024-10-23 08:19:30 -04:00
Matthias Clasen
d56d1ca4f3 gdk: Bling up debug spew slightly
We use ✓ and ✗ in some other places already, be consistent.
2024-10-23 08:18:45 -04:00
Matthias Clasen
5ff52f78b7 vulkan: Cosmetics
Rename gsk_vulkan_feature_keys to gdk_vulkan_feature_keys, since
these keys live in gdk.
2024-10-23 08:18:38 -04:00
Arjan Molenaar
4ed39c5c78 macos: Add dummy pasteboard item if no mimetypes have been translated
Not all mime types will be translated to pasteboard types, hence we
need to check if any are translated. If not add an internal type.
2024-10-23 08:18:15 -04:00
Arjan Molenaar
e614b1af42 macos: Fix double emission of mouse release event
The event is propagated anyway.

Fixes #7021.
2024-10-23 08:11:37 -04:00
Bruce Cowan
83e182e820 gdk: Remove a couple of stray semicolons 2024-10-23 08:10:59 -04:00
Simon McVittie
b446a37e28 printing: Treat any G_DBUS_ERROR contacting Avahi as non-problematic
If we get an error from the message bus (dbus-daemon or dbus-broker),
for example ServiceUnknown if Avahi is not installed or perhaps
SpawnFailed if the service is disabled, it is mapped to a GLib GError.
The errors typically emitted by the message bus belong to the GDBusError
domain, but if nobody has registered the G_DBUS_ERROR domain yet,
then they might be mapped to G_IO_ERROR_DBUS_ERROR instead.

Previously, this code ignored G_IO_ERROR_DBUS_ERROR, but emitted a
warning if the error happens to have been mapped to G_DBUS_ERROR.
This resulted in action-at-a-distance: an unrelated component
triggering registration of the G_DBUS_ERROR domain would make printing
dialogs log the warning. This seems undesirable, and in particular it
can cause test failures, because GLib's test framework makes warnings
fatal by default.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-10-23 08:10:46 -04:00
Simon McVittie
4a3f4d2769 printing: If we cannot contact Avahi, debug-log the error message
If we get a G_IO_ERROR_DBUS_ERROR here, we shouldn't make too much noise
about it by default, but it's still a useful data point for debugging
and diagnosis.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-10-23 08:10:38 -04:00
Lukáš Tyrychtr
d6ddcb5b93 a11y: Fix GtkListview's selection interface implementation
When determining the number of selected children, we were properly
counting only items, but in the rest, we were confused by row headers.
Because the GtkListItemBase methods did not throw a warning on inappropriate
pointer type passed, we happily passed the row headers, got some private
data object as the wrong type, and then returned nonsense, for example, 2
for gtk_list_item_base_get_selected.
2024-10-23 08:10:22 -04:00
Matthias Clasen
13cf7c2256 vulkan: Release swapchain images
With the swapchain maintenance extension, we have a way to release
the acquired swapchain image before recreating the swapchain, in
the VK_SUBOPTIMAL_KHR case. Use it.

Tested by toggling fullscreen in the bloatpad example, which causes
mesa to return VK_SUBOPTIMAL_KHR (since dmabuf modifiers change).
2024-10-23 08:09:45 -04:00
Matthias Clasen
bef516bf5a vulkan: Avoid a validation error
If vkAcquireNextImageKHR returns VK_SUBOPTIMAL_KHR, the semaphore
is in use, but vkDeviceWaitIdle will not wait for it, since it is
not associated with a queue. Make sure that is the case, so we don't
run into a validation error when we try vkAcquireNextImageKHR with
the same semaphore, after recreating the swap chain.

See https://github.com/KhronosGroup/Vulkan-Docs/issues/1059 for
some related discussion.

Fixes: #7079
2024-10-23 08:09:35 -04:00
Matthias Clasen
4112535b44 vulkan: Add some more debug
Move the "Recreating the swapchain" message to where we do so, and
add some more debug logging there.
2024-10-23 08:09:29 -04:00
Barnabás Pőcze
3131e352da gsk: gsk_border_node_new(): Fix dead cleanup code
The `gdk_color_finish()` calls are currently after the `return`,
so they are never executed. Move the `return` below the cleanup
code to avoid that.

Fixes: bd3d1f7715 ("gsk: Add private border node api")
2024-10-23 08:07:03 -04:00
Juan Pablo Ugarte
c5a2cbcc70 gtk/gtkaccessiblevalue.c: Fix GTK_ACCESSIBLE_RELATION_SET_SIZE collect_rels value 2024-10-23 08:06:27 -04:00
Jordan Petridis
821e8289d4 gtkcssprovider: Use g_file_peek_path to get the uri for the sysprof marker
This avoids an extra allocation.

Additionally avoid calling it if file is already null.
2024-10-23 08:06:02 -04:00
Daniel Șerbănescu
b0b1d7a928 Update Romanian translation 2024-10-21 16:55:51 +00:00
Віктар Гаўрылавец
3a1cf43028 Update Belarusian translation 2024-10-18 09:16:52 +00:00
Andi Chandler
fa2f49ee7c Update British English translation 2024-10-17 13:07:39 +00:00
Rūdolfs Mazurs
5cefdf58a1 Update Latvian translation 2024-10-13 13:53:13 +00:00
Matthias Clasen
68eb82a028 Merge branch 'ebassi/issue-7069-backport' into 'gtk-4-16'
gtk/accessibletext: handle NULL default values

See merge request GNOME/gtk!7815
2024-10-09 10:39:20 +00:00
Christian Hergert
65eee73e82 gtk/accessibletext: handle NULL default values
The default implementation for get_default_attributes() returns NULL for
both names and values yet the code which iterates them is assuming they
will never be NULL.

Since the interface implies that if the values are set, they will return
valid strings, make the default implementation do that.

Fixes: #7069
(cherry picked from commit ab1c85830c)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2024-10-08 19:13:27 +01:00
Luca Bacci
861f9875ac Merge branch 'backport-mr-7776' into 'gtk-4-16'
WGL: Avoid using swap exchange on NVidia drivers [gtk-4-16]

See merge request GNOME/gtk!7811
2024-10-08 15:23:56 +00:00
Luca Bacci
03fa775407 WGL: Avoid using swap method exchange on NVidia drivers
It seems that NVidia sets PFD_SWAP_EXCHANGE / WGL_SWAP_EXCHANGE_ARB
on pixel formats but doesn't guarantee that the backbuffer age is
constantly 2. My guess is that they use swap exchange only to signal
usage of a flip present method.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/7019
2024-10-08 12:41:10 +02:00
Matthias Clasen
15358d0d5e Merge branch 'backports-for-4-16' into 'gtk-4-16'
gpu: Remove warning

See merge request GNOME/gtk!7808
2024-10-07 18:28:39 +00:00