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
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
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!7859Fixes#7091
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
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
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
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>
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>
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.
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).
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
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")
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>
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