Bug#1107830: unblock: gtk4/4.18.6+ds-2
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: gtk4@packages.debian.org
Control: affects -1 + src:gtk4
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package gtk4
[ Reason ]
New upstream bugfix release
[ Impact ]
Several bug fixes, including crashes.
[ Tests ]
My GNOME desktop continues to work normally (tried various apps
such as GNOME Software, GNOME Settings, Nautilus).
The test suite still passes at build-time and as an autopkgtest,
including new test coverage for the gsk/gskpathparser.c changes.
[ Risks ]
Key package, central to our default desktop environment.
This particular upstream has not always been as strict as we would like
about bugfix-only changes in micro releases, but in this case the
changes seem to be narrowly-targeted. The noisiest changes that affect
production code are those in gsk/gskpathparser.c, which fix parsing of
some SVG symbolic icons; there is new test coverage for these in
testsuite/gsk/path-special-cases.c.
The change in gtk/a11y/gtkatspicontext.c is to fix AT-SPI spec compliance,
but could conceivably cause accessibility tools to regress if they were
relying on the previous, non-spec-compliant D-Bus signal names
"activate" and "deactivate" (D-Bus signal names are case-sensitive, and
the correct names start with a capital letter).
The changes in gtk/gtkimcontextwayland.c and gtk/inspector/ are noisier
than I would normally expect for a stable release, but are only relevant
when using GTK's built-in "inspector" debugging tool (press Ctrl+Shift+I
while running a GTK 4 app), and are inactive in normal use of GTK.
Changes in demos/ do not affect production code, only gtk-4-examples.
Changes in gdk/macos/ are not compiled in Debian.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
(lightly filtered to exclude translations and irrelevant changes)
unblock gtk4/4.18.6+ds-2
debdiff *.dsc | filterdiff -p1 -x.gitlab-ci.yml -x'po/*.po' -x'subprojects/pango/*'
diff -Nru gtk4-4.18.5+ds/debian/changelog gtk4-4.18.6+ds/debian/changelog
--- gtk4-4.18.5+ds/debian/changelog 2025-05-04 15:39:45.000000000 +0100
+++ gtk4-4.18.6+ds/debian/changelog 2025-06-15 10:37:29.000000000 +0100
@@ -1,3 +1,62 @@
+gtk4 (4.18.6+ds-2) unstable; urgency=medium
+
+ * Add packaging changes to previous changelog entry that were
+ accidentally left undocumented in the previous upload
+
+ -- Simon McVittie <smcv@debian.org> Sun, 15 Jun 2025 10:37:29 +0100
+
+gtk4 (4.18.6+ds-1) unstable; urgency=medium
+
+ * New upstream bugfix release
+ - In the cups printer driver, fix NULL-termination on arrays of choices,
+ avoiding a possible crash
+ (gtk!8595 upstream)
+ - Fix a crash caused by using uninitialized memory in GtkCssKeyframes
+ (gtk!8656 upstream)
+ - Fix a memory leak in GtkCssValue
+ (gtk!8629 upstream)
+ - Avoid a warning when gtk_application_inhibit() is called with
+ GTK_APPLICATION_INHIBIT_IDLE and no window
+ (gtk!8638 upstream)
+ - Fix names of Activate, Deactivate window events to match AT-SPI spec
+ (gtk!8652 upstream)
+ - Render symbolic SVG icons more correctly by improving the parser
+ for the path mini-language, and improve related test coverage
+ (gtk#7575, gtk!8548, gtk!8549, gtk!8642 upstream)
+ - Under Wayland, delay destruction of the event queue until after
+ everything has been detached from it
+ (gtk!8481 upstream)
+ - Simplify gdk_memory_texture_builder_set_color_state() by not handling
+ a NULL state that was already checked for
+ (gtk!8582 upstream)
+ - Improve the "inspector" debugging tool:
+ + show more environment variables
+ + show the text protocol
+ + centre-align accessibility errors
+ + report an error if buttons are too small
+ + make warnings not wrap too much
+ + remove incorrect early-returns
+ - Improve examples:
+ + In gtkgears fix lighting
+ + In gtk-demo, add missing accessibility properties
+ + In gtk-demo, fix a regression in the ucd demo
+ + In node-editor, make the help non-editable
+ - Documentation updates
+ - Translation updates: ca, de, fi, he, sk
+ - Upstream CI changes not relevant to Debian
+ - macOS-specific changes not relevant to Debian
+ - Minor updates in vendored pango subproject, not relevant to Debian
+ (we use libpango1.0-dev instead)
+ * d/libgtk-4-1.bug-control: Add known out-of-tree IM modules to
+ Package-Status.
+ There are considerably fewer of these than GTK 3 modules, because
+ GTK 4 does not support arbitrary GTK_MODULES, but they could still be
+ involved in crashes; so it seems wise to diagnose them as "packages
+ libgtk-4-1 is related to" in bug reports.
+ * d/libgtk-4-doc.links: Remove unused, dangling symlinks to GLib docs
+
+ -- Simon McVittie <smcv@debian.org> Sat, 14 Jun 2025 14:06:01 +0100
+
gtk4 (4.18.5+ds-1) unstable; urgency=medium
[ Jeremy Bícha ]
diff -Nru gtk4-4.18.5+ds/debian/libgtk-4-1.bug-control gtk4-4.18.6+ds/debian/libgtk-4-1.bug-control
--- gtk4-4.18.5+ds/debian/libgtk-4-1.bug-control 1970-01-01 01:00:00.000000000 +0100
+++ gtk4-4.18.6+ds/debian/libgtk-4-1.bug-control 2025-06-15 10:37:29.000000000 +0100
@@ -0,0 +1 @@
+Package-Status: fcitx5-frontend-gtk4 ibus-gtk4 scim-gtk-immodule
diff -Nru gtk4-4.18.5+ds/debian/libgtk-4-doc.links gtk4-4.18.6+ds/debian/libgtk-4-doc.links
--- gtk4-4.18.5+ds/debian/libgtk-4-doc.links 2025-05-04 15:39:45.000000000 +0100
+++ gtk4-4.18.6+ds/debian/libgtk-4-doc.links 2025-06-15 10:37:29.000000000 +0100
@@ -8,7 +8,3 @@
usr/share/doc/${env:DOC_PKG}/gsk4 usr/share/devhelp/books/gsk4
usr/share/doc/${env:DOC_PKG}/gtk4 usr/share/doc/${env:DEV_PKG}/gtk4
usr/share/doc/${env:DOC_PKG}/gtk4 usr/share/devhelp/books/gtk4
-usr/share/doc/libglib2.0-doc/glib usr/share/doc/${env:DEV_PKG}/glib
-usr/share/doc/libglib2.0-doc/glib usr/share/doc/${env:DOC_PKG}/glib
-usr/share/doc/libglib2.0-doc/gobject usr/share/doc/${env:DEV_PKG}/gobject
-usr/share/doc/libglib2.0-doc/gobject usr/share/doc/${env:DOC_PKG}/gobject
diff -Nru gtk4-4.18.5+ds/demos/gtk-demo/demotaggedentry.c gtk4-4.18.6+ds/demos/gtk-demo/demotaggedentry.c
--- gtk4-4.18.5+ds/demos/gtk-demo/demotaggedentry.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/demos/gtk-demo/demotaggedentry.c 2025-06-09 21:44:13.000000000 +0100
@@ -60,6 +60,11 @@
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
GTK_STYLE_PROVIDER (provider),
800);
+
+ gtk_accessible_update_property (GTK_ACCESSIBLE (entry),
+ GTK_ACCESSIBLE_PROPERTY_LABEL, "Tagged Entry",
+ -1);
+
g_object_unref (provider);
}
@@ -421,7 +426,11 @@
GtkWidget *image;
image = gtk_image_new_from_icon_name ("window-close-symbolic");
+ g_object_set (image, "accessible-role", GTK_ACCESSIBLE_ROLE_PRESENTATION, NULL);
tag->button = gtk_button_new ();
+ gtk_accessible_update_property (GTK_ACCESSIBLE (tag->button),
+ GTK_ACCESSIBLE_PROPERTY_LABEL, "Close",
+ -1);
gtk_button_set_child (GTK_BUTTON (tag->button), image);
gtk_widget_set_halign (tag->button, GTK_ALIGN_CENTER);
gtk_widget_set_valign (tag->button, GTK_ALIGN_CENTER);
diff -Nru gtk4-4.18.5+ds/demos/gtk-demo/gtkgears.c gtk4-4.18.6+ds/demos/gtk-demo/gtkgears.c
--- gtk4-4.18.5+ds/demos/gtk-demo/gtkgears.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/demos/gtk-demo/gtkgears.c 2025-06-09 21:44:13.000000000 +0100
@@ -677,8 +677,8 @@
"\n"
" // Multiply the diffuse value by the vertex color (which is fixed in this case)\n"
" // to get the actual color that we will use to draw this vertex with\n"
-" float diffuse = max(dot(N, L), 0.0);\n"
-" Color = diffuse * MaterialColor;\n"
+" float diffuse = (dot(N, L) + 1.0) * 0.5;\n"
+" Color = vec4(diffuse * MaterialColor.rgb, 1.0);\n"
"\n"
" // Transform the position to clip coordinates\n"
" gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);\n"
@@ -715,8 +715,8 @@
"\n"
" // Multiply the diffuse value by the vertex color (which is fixed in this case)\n"
" // to get the actual color that we will use to draw this vertex with\n"
-" float diffuse = max(dot(N, L), 0.0);\n"
-" Color = diffuse * MaterialColor;\n"
+" float diffuse = (dot(N, L) + 1.0) * 0.5;\n"
+" Color = vec4(diffuse * MaterialColor.rgb, 1.0);\n"
"\n"
" // Transform the position to clip coordinates\n"
" gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);\n"
diff -Nru gtk4-4.18.5+ds/demos/gtk-demo/listview_ucd.c gtk4-4.18.6+ds/demos/gtk-demo/listview_ucd.c
--- gtk4-4.18.5+ds/demos/gtk-demo/listview_ucd.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/demos/gtk-demo/listview_ucd.c 2025-06-09 21:44:13.000000000 +0100
@@ -255,7 +255,7 @@
if (g_unichar_isprint (codepoint))
g_unichar_to_utf8 (codepoint, buffer);
- gtk_inscription_set_text (GTK_INSCRIPTION (label), buffer);
+ gtk_label_set_text (GTK_LABEL (label), buffer);
}
GtkWidget *
diff -Nru gtk4-4.18.5+ds/demos/node-editor/help-window.ui gtk4-4.18.6+ds/demos/node-editor/help-window.ui
--- gtk4-4.18.5+ds/demos/node-editor/help-window.ui 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/demos/node-editor/help-window.ui 2025-06-09 21:44:13.000000000 +0100
@@ -14,6 +14,7 @@
<property name="top-margin">20</property>
<property name="bottom-margin">20</property>
<property name="monospace">1</property>
+ <property name="editable">0</property>
<property name="buffer">
<object class="GtkTextBuffer" id="buffer"/>
</property>
diff -Nru gtk4-4.18.5+ds/gdk/gdkmemorytexturebuilder.c gtk4-4.18.6+ds/gdk/gdkmemorytexturebuilder.c
--- gtk4-4.18.5+ds/gdk/gdkmemorytexturebuilder.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gdk/gdkmemorytexturebuilder.c 2025-06-09 21:44:13.000000000 +0100
@@ -397,7 +397,7 @@
/**
* gdk_memory_texture_builder_set_color_state:
* @self: a `GdkMemoryTextureBuilder`
- * @color_state: (nullable): The colorstate describing the data
+ * @color_state: The colorstate describing the data
*
* Sets the colorstate describing the data.
*
@@ -417,9 +417,7 @@
return;
g_clear_pointer (&self->color_state, gdk_color_state_unref);
- self->color_state = color_state;
- if (color_state)
- gdk_color_state_ref (color_state);
+ self->color_state = gdk_color_state_ref (color_state);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_COLOR_STATE]);
}
diff -Nru gtk4-4.18.5+ds/gdk/macos/gdkmacoskeymap.c gtk4-4.18.6+ds/gdk/macos/gdkmacoskeymap.c
--- gtk4-4.18.5+ds/gdk/macos/gdkmacoskeymap.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gdk/macos/gdkmacoskeymap.c 2025-06-09 21:44:13.000000000 +0100
@@ -338,8 +338,6 @@
if (p[3] == p[2])
p[3] = 0;
- if (p[2] == p[1])
- p[2] = 0;
if (p[1] == p[0])
p[1] = 0;
if (p[0] == p[2] &&
@@ -582,7 +580,7 @@
if (hardware_keycode < 0 || hardware_keycode >= NUM_KEYCODES)
return FALSE;
- tmp_keyval = translate_keysym (hardware_keycode, group, state, level, effective_group);
+ tmp_keyval = translate_keysym (hardware_keycode, group, state, effective_group, level);
/* Check if modifiers modify the keyval */
if (consumed_modifiers)
diff -Nru gtk4-4.18.5+ds/gdk/wayland/gdksubsurface-wayland.c gtk4-4.18.6+ds/gdk/wayland/gdksubsurface-wayland.c
--- gtk4-4.18.5+ds/gdk/wayland/gdksubsurface-wayland.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gdk/wayland/gdksubsurface-wayland.c 2025-06-09 21:44:13.000000000 +0100
@@ -190,7 +190,6 @@
gdk_wayland_display_dispatch_queue (GDK_DISPLAY (display), event_queue);
zwp_linux_buffer_params_v1_destroy (params);
- wl_event_queue_destroy (event_queue);
buffer = cd.buffer;
@@ -204,6 +203,8 @@
listener->release (data, NULL);
}
+ wl_event_queue_destroy (event_queue);
+
return buffer;
}
diff -Nru gtk4-4.18.5+ds/gsk/gskpathparser.c gtk4-4.18.6+ds/gsk/gskpathparser.c
--- gtk4-4.18.5+ds/gsk/gskpathparser.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gsk/gskpathparser.c 2025-06-09 21:44:13.000000000 +0100
@@ -392,9 +392,9 @@
gsk_path_parse (const char *string)
{
GskPathBuilder *builder;
- double x, y;
+ double x, y; /* current point */
double prev_x1, prev_y1;
- double path_x, path_y;
+ double path_x, path_y; /* start point of the current subpath */
const char *p;
char cmd;
char prev_cmd;
@@ -444,39 +444,47 @@
/* Look for special contours */
if (parse_rectangle (&p, &x1, &y1, &w, &h))
{
- gsk_path_builder_add_rect (builder, &GRAPHENE_RECT_INIT (x1, y1, w, h));
- if (_strchr ("zZX", prev_cmd))
+ if (cmd == 'm')
{
- path_x = x1;
- path_y = y1;
+ x1 += x;
+ y1 += y;
}
+ gsk_path_builder_add_rect (builder, &GRAPHENE_RECT_INIT (x1, y1, w, h));
+ path_x = x1;
+ path_y = y1;
+ cmd = 'z';
x = x1;
y = y1;
}
else if (parse_circle (&p, &x1, &y1, &r))
{
- gsk_path_builder_add_circle (builder, &GRAPHENE_POINT_INIT (x1, y1), r);
-
- if (_strchr ("zZX", prev_cmd))
+ if (cmd == 'm')
{
- path_x = x1 + r;
- path_y = y1;
+ x1 += x;
+ y1 += y;
}
+ gsk_path_builder_add_circle (builder, &GRAPHENE_POINT_INIT (x1, y1), r);
+ path_x = x1 + r;
+ path_y = y1;
+ cmd = 'z';
x = x1 + r;
y = y1;
}
else if (parse_rounded_rect (&p, &rr))
{
- gsk_path_builder_add_rounded_rect (builder, &rr);
-
- if (_strchr ("zZX", prev_cmd))
+ if (cmd == 'm')
{
- path_x = rr.bounds.origin.x + rr.corner[GSK_CORNER_TOP_LEFT].width;
- path_y = rr.bounds.origin.y;
+ rr.bounds.origin.x += x;
+ rr.bounds.origin.y += y;
}
+ gsk_path_builder_add_rounded_rect (builder, &rr);
+
+ path_x = rr.bounds.origin.x + rr.corner[GSK_CORNER_TOP_LEFT].width;
+ path_y = rr.bounds.origin.y;
+ cmd = 'Z';
x = rr.bounds.origin.x + rr.corner[GSK_CORNER_TOP_LEFT].width;
y = rr.bounds.origin.y;
}
@@ -493,11 +501,8 @@
else
{
gsk_path_builder_move_to (builder, x1, y1);
- if (_strchr ("zZX", prev_cmd))
- {
- path_x = x1;
- path_y = y1;
- }
+ path_x = x1;
+ path_y = y1;
}
x = x1;
@@ -747,7 +752,7 @@
y2 += y;
}
if (_strchr ("zZ", prev_cmd))
- {
+ {
gsk_path_builder_move_to (builder, x, y);
path_x = x;
path_y = y;
diff -Nru gtk4-4.18.5+ds/gtk/a11y/gtkatspicontext.c gtk4-4.18.6+ds/gtk/a11y/gtkatspicontext.c
--- gtk4-4.18.5+ds/gtk/a11y/gtkatspicontext.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/a11y/gtkatspicontext.c 2025-06-09 21:44:13.000000000 +0100
@@ -1258,9 +1258,9 @@
if (gtk_accessible_get_accessible_role (accessible) == GTK_ACCESSIBLE_ROLE_WINDOW)
{
if (state)
- emit_window_event (self, "activate");
+ emit_window_event (self, "Activate");
else
- emit_window_event (self, "deactivate");
+ emit_window_event (self, "Deactivate");
}
}
}
diff -Nru gtk4-4.18.5+ds/gtk/gtkapplication-wayland.c gtk4-4.18.6+ds/gtk/gtkapplication-wayland.c
--- gtk4-4.18.5+ds/gtk/gtkapplication-wayland.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/gtkapplication-wayland.c 2025-06-09 21:44:13.000000000 +0100
@@ -156,7 +156,7 @@
inhibitor->flags = flags;
wayland->inhibitors = g_slist_prepend (wayland->inhibitors, inhibitor);
- if (flags & GTK_APPLICATION_INHIBIT_IDLE && impl->application == gtk_window_get_application (window))
+ if (flags & GTK_APPLICATION_INHIBIT_IDLE && window && impl->application == gtk_window_get_application (window))
{
surface = gtk_native_get_surface (GTK_NATIVE (window));
if (GDK_IS_WAYLAND_TOPLEVEL (surface))
diff -Nru gtk4-4.18.5+ds/gtk/gtkbuilderlistitemfactory.c gtk4-4.18.6+ds/gtk/gtkbuilderlistitemfactory.c
--- gtk4-4.18.5+ds/gtk/gtkbuilderlistitemfactory.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/gtkbuilderlistitemfactory.c 2025-06-09 21:44:13.000000000 +0100
@@ -55,6 +55,11 @@
* </template>
* </interface>
* ```
+ *
+ * A common approach is to embed such templates as CDATA marked sections into
+ * a surrounding UI file. Note that if you use this approach, extracting
+ * translatable strings with xgettext will not work for strings inside the
+ * marked section.
*/
struct _GtkBuilderListItemFactory
diff -Nru gtk4-4.18.5+ds/gtk/gtkcsskeyframes.c gtk4-4.18.6+ds/gtk/gtkcsskeyframes.c
--- gtk4-4.18.5+ds/gtk/gtkcsskeyframes.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/gtkcsskeyframes.c 2025-06-09 21:44:13.000000000 +0100
@@ -131,7 +131,10 @@
}
if (keyframes->variables)
- keyframes->variables = g_realloc (keyframes->variables, sizeof (GtkCssVariableSet *) * keyframes->n_keyframes);
+ {
+ keyframes->variables = g_realloc (keyframes->variables, sizeof (GtkCssVariableSet *) * keyframes->n_keyframes);
+ keyframes->variables[keyframes->n_keyframes - 1] = NULL;
+ }
return k;
}
diff -Nru gtk4-4.18.5+ds/gtk/gtkcssreferencevalue.c gtk4-4.18.6+ds/gtk/gtkcssreferencevalue.c
--- gtk4-4.18.5+ds/gtk/gtkcssreferencevalue.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/gtkcssreferencevalue.c 2025-06-09 21:44:13.000000000 +0100
@@ -59,6 +59,7 @@
gtk_css_variable_value_unref (value->value);
if (value->file)
g_object_unref (value->file);
+ g_free (value);
}
static ResolveResult
diff -Nru gtk4-4.18.5+ds/gtk/gtkicontheme.c gtk4-4.18.6+ds/gtk/gtkicontheme.c
--- gtk4-4.18.5+ds/gtk/gtkicontheme.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/gtkicontheme.c 2025-06-09 21:44:13.000000000 +0100
@@ -3674,17 +3674,14 @@
/**
* gtk_icon_paintable_is_symbolic: (get-property is-symbolic)
- * @self: a `GtkIconPaintable`
+ * @self: an icon paintable
*
* Checks if the icon is symbolic or not.
*
* This currently uses only the file name and not the file contents
* for determining this. This behaviour may change in the future.
*
- * Note that to render a symbolic `GtkIconPaintable` properly (with
- * recoloring), you have to set its icon name on a `GtkImage`.
- *
- * Returns: %TRUE if the icon is symbolic, %FALSE otherwise
+ * Returns: true if the icon is symbolic, false otherwise
*/
gboolean
gtk_icon_paintable_is_symbolic (GtkIconPaintable *icon)
diff -Nru gtk4-4.18.5+ds/gtk/gtkimcontextwayland.c gtk4-4.18.6+ds/gtk/gtkimcontextwayland.c
--- gtk4-4.18.5+ds/gtk/gtkimcontextwayland.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/gtkimcontextwayland.c 2025-06-09 21:44:13.000000000 +0100
@@ -127,6 +127,19 @@
return global;
}
+struct wl_proxy *
+gtk_im_context_wayland_get_text_protocol (GdkDisplay *display)
+{
+ GtkIMContextWaylandGlobal *global;
+
+ global = gtk_im_context_wayland_global_get (display);
+
+ if (!global)
+ return NULL;
+
+ return (struct wl_proxy *) global->text_input;
+}
+
static void
notify_im_change (GtkIMContextWayland *context,
enum zwp_text_input_v3_change_cause cause)
@@ -732,7 +745,7 @@
g_free (global);
}
-static GtkIMContextWaylandGlobal *
+GtkIMContextWaylandGlobal *
gtk_im_context_wayland_global_get (GdkDisplay *display)
{
GtkIMContextWaylandGlobal *global;
diff -Nru gtk4-4.18.5+ds/gtk/gtkimcontextwayland.h gtk4-4.18.6+ds/gtk/gtkimcontextwayland.h
--- gtk4-4.18.5+ds/gtk/gtkimcontextwayland.h 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/gtkimcontextwayland.h 2025-06-09 21:44:13.000000000 +0100
@@ -18,10 +18,16 @@
#pragma once
#include <gtk/gtk.h>
+#include <glib-object.h>
+#include <gdk/gdkdisplay.h>
+#include <wayland-client-protocol.h>
G_BEGIN_DECLS
GType gtk_im_context_wayland_get_type (void) G_GNUC_CONST;
+struct wl_proxy *gtk_im_context_wayland_get_text_protocol (GdkDisplay *display);
+
+
G_END_DECLS
diff -Nru gtk4-4.18.5+ds/gtk/gtkpopover.c gtk4-4.18.6+ds/gtk/gtkpopover.c
--- gtk4-4.18.5+ds/gtk/gtkpopover.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/gtkpopover.c 2025-06-09 21:44:13.000000000 +0100
@@ -29,12 +29,17 @@
* </picture>
*
* It is primarily meant to provide context-dependent information
- * or options. Popovers are attached to a parent widget. By default,
- * they point to the whole widget area, although this behavior can be
- * changed with [method@Gtk.Popover.set_pointing_to].
+ * or options. Popovers are attached to a parent widget. The parent widget
+ * must support popover children, as [class@Gtk.MenuButton] and
+ * [class@Gtk.PopoverMenuBar] do. If you want to make a custom widget that
+ * has an attached popover, you need to call [method@Gtk.Popover.present]
+ * in your [vfunc@Gtk.Widget.size_allocate] vfunc, in order to update the
+ * positioning of the popover.
*
* The position of a popover relative to the widget it is attached to
- * can also be changed with [method@Gtk.Popover.set_position]
+ * can also be changed with [method@Gtk.Popover.set_position]. By default,
+ * it points to the whole widget area, but it can be made to point to
+ * a specific area using [method@Gtk.Popover.set_pointing_to].
*
* By default, `GtkPopover` performs a grab, in order to ensure input
* events get redirected to it while it is shown, and also so the popover
diff -Nru gtk4-4.18.5+ds/gtk/inspector/a11yoverlay.c gtk4-4.18.6+ds/gtk/inspector/a11yoverlay.c
--- gtk4-4.18.5+ds/gtk/inspector/a11yoverlay.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/inspector/a11yoverlay.c 2025-06-09 21:44:13.000000000 +0100
@@ -142,14 +142,10 @@
switch (gtk_accessible_role_get_naming (role))
{
case GTK_ACCESSIBLE_NAME_ALLOWED:
- return FIX_SEVERITY_GOOD;
+ break;
case GTK_ACCESSIBLE_NAME_REQUIRED:
- if (label_set)
- {
- return FIX_SEVERITY_GOOD;
- }
- else
+ if (!label_set)
{
if (gtk_accessible_role_supports_name_from_author (role))
{
@@ -162,10 +158,6 @@
return FIX_SEVERITY_ERROR;
}
- else
- {
- return FIX_SEVERITY_GOOD;
- }
}
else
{
@@ -183,18 +175,10 @@
return FIX_SEVERITY_ERROR;
}
- else
- {
- return FIX_SEVERITY_GOOD;
- }
break;
case GTK_ACCESSIBLE_NAME_RECOMMENDED:
- if (label_set)
- {
- return FIX_SEVERITY_GOOD;
- }
- else
+ if (!label_set)
{
*hint = g_strdup_printf ("label recommended for %s", role_name);
@@ -203,11 +187,7 @@
break;
case GTK_ACCESSIBLE_NAME_NOT_RECOMMENDED:
- if (!label_set)
- {
- return FIX_SEVERITY_GOOD;
- }
- else
+ if (label_set)
{
*hint = g_strdup_printf ("label not recommended for %s", role_name);
@@ -307,6 +287,23 @@
return FIX_SEVERITY_ERROR;
}
+ if (role == GTK_ACCESSIBLE_ROLE_BUTTON)
+ {
+ GtkAccessible *accessible = gtk_at_context_get_accessible (context);
+
+ if (GTK_IS_WIDGET (accessible))
+ {
+ int width = gtk_widget_get_width (GTK_WIDGET (accessible));
+ int height = gtk_widget_get_height (GTK_WIDGET (accessible));
+
+ if (width < 24 || height < 24)
+ {
+ *hint = g_strdup_printf ("Button is too small: %dx%d", width, height);
+ return FIX_SEVERITY_ERROR;
+ }
+ }
+ }
+
return FIX_SEVERITY_GOOD;
}
@@ -328,6 +325,19 @@
}
static void
+center_over_within (graphene_rect_t *rect,
+ const graphene_rect_t *over,
+ const graphene_rect_t *within)
+{
+ graphene_point_t center;
+
+ graphene_rect_get_center (over, ¢er);
+
+ rect->origin.x = CLAMP (center.x - 0.5 * rect->size.width, within->origin.x, within->origin.x + within->size.width - rect->size.width);
+ rect->origin.y = CLAMP (center.y - 0.5 * rect->size.height, within->origin.y, within->origin.y + within->size.height - rect->size.height);
+}
+
+static void
recurse_child_widgets (GtkA11yOverlay *self,
GtkWidget *widget,
GtkSnapshot *snapshot)
@@ -363,6 +373,7 @@
if (hint)
{
+ int toplevel_width, toplevel_height;
PangoLayout *layout;
PangoRectangle extents;
GdkRGBA black = { 0, 0, 0, 1 };
@@ -373,11 +384,18 @@
{ 0, 0, 0, 1 },
{ 0, 0, 0, 1 },
};
+ GtkNative *native;
+ graphene_rect_t over, within, bounds;
+ gboolean ret G_GNUC_UNUSED;
+
+ native = gtk_widget_get_native (widget);
+ toplevel_width = gtk_widget_get_width (GTK_WIDGET (native));
+ toplevel_height = gtk_widget_get_height (GTK_WIDGET (native));
gtk_snapshot_save (snapshot);
layout = gtk_widget_create_pango_layout (widget, hint);
- pango_layout_set_width (layout, width * PANGO_SCALE);
+ pango_layout_set_width (layout, toplevel_width * PANGO_SCALE);
pango_layout_get_pixel_extents (layout, NULL, &extents);
@@ -386,18 +404,29 @@
extents.width += 10;
extents.height += 10;
+ ret = gtk_widget_compute_point (widget, GTK_WIDGET (native), &GRAPHENE_POINT_INIT (0, 0), &over.origin);
+ over.size.width = width;
+ over.size.height = height;
+
+ graphene_rect_init (&within, 0, 0, toplevel_width, toplevel_height);
+
+ graphene_rect_init (&bounds, 0, 0, extents.width, extents.height);
+ center_over_within (&bounds, &over, &within);
+
color.alpha = 0.8f;
- gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (0.5 * (width - extents.width), 0.5 * (height - extents.height)));
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (bounds.origin.x - over.origin.x,
+ bounds.origin.y - over.origin.y));
gtk_snapshot_append_border (snapshot,
- &GSK_ROUNDED_RECT_INIT (extents.x, extents.y,
+ &GSK_ROUNDED_RECT_INIT (0, 0,
extents.width, extents.height),
widths, colors);
gtk_snapshot_append_color (snapshot, &color,
- &GRAPHENE_RECT_INIT (extents.x, extents.y,
+ &GRAPHENE_RECT_INIT (0, 0,
extents.width, extents.height));
+ gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (5, 5));
gtk_snapshot_append_layout (snapshot, layout, &black);
g_object_unref (layout);
diff -Nru gtk4-4.18.5+ds/gtk/inspector/general.c gtk4-4.18.6+ds/gtk/inspector/general.c
--- gtk4-4.18.5+ds/gtk/inspector/general.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/gtk/inspector/general.c 2025-06-09 21:44:13.000000000 +0100
@@ -71,6 +71,7 @@
#include <xkbcommon/xkbcommon.h>
#include "wayland/gdkdisplay-wayland.h"
#include "wayland/gdkwaylandcolor-private.h"
+#include "gtk/gtkimcontextwayland.h"
#endif
#ifdef GDK_WINDOWING_BROADWAY
@@ -1170,12 +1171,15 @@
"LANGUAGE",
"LC_ALL",
"LC_CTYPE",
+ "LIBGL_ALWAYS_SOFTWARE",
"LPDEST",
+ "MESA_VK_DEVICE_SELECT",
"PANGOCAIRO_BACKEND",
"PANGO_LANGUAGE",
"PRINTER",
"SECMEM_FORCE_FALLBACK",
"WAYLAND_DISPLAY",
+ "XDG_ACTIVATION_TOKEN",
"XDG_DATA_HOME",
"XDG_DATA_DIRS",
"XDG_RUNTIME_DIR",
@@ -1308,6 +1312,7 @@
append_wayland_protocol_row (gen, d->color ? gdk_wayland_color_get_color_manager (d->color) : NULL);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->system_bell);
append_wayland_protocol_row (gen, (struct wl_proxy *)d->cursor_shape);
+ append_wayland_protocol_row (gen, gtk_im_context_wayland_get_text_protocol (display));
}
}
@@ -1348,6 +1353,8 @@
append_wayland_protocol (string, (struct wl_proxy *)d->single_pixel_buffer, &count);
append_wayland_protocol (string, d->color ? gdk_wayland_color_get_color_manager (d->color) : NULL, &count);
append_wayland_protocol (string, (struct wl_proxy *)d->system_bell, &count);
+ append_wayland_protocol (string, (struct wl_proxy *)d->cursor_shape, &count);
+ append_wayland_protocol (string , gtk_im_context_wayland_get_text_protocol (display), &count);
g_string_append (string, " |\n");
}
diff -Nru gtk4-4.18.5+ds/meson.build gtk4-4.18.6+ds/meson.build
--- gtk4-4.18.5+ds/meson.build 2025-06-15 12:17:47.000000000 +0100
+++ gtk4-4.18.6+ds/meson.build 2025-06-15 12:17:49.000000000 +0100
@@ -1,5 +1,5 @@
project('gtk', 'c',
- version: '4.18.5',
+ version: '4.18.6',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',
diff -Nru gtk4-4.18.5+ds/modules/printbackends/gtkprintbackendcups.c gtk4-4.18.6+ds/modules/printbackends/gtkprintbackendcups.c
--- gtk4-4.18.5+ds/modules/printbackends/gtkprintbackendcups.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/modules/printbackends/gtkprintbackendcups.c 2025-06-09 21:44:13.000000000 +0100
@@ -5603,8 +5603,8 @@
length = g_list_length (ipp_choices);
- choices = g_new0 (char *, length);
- choices_display = g_new0 (char *, length);
+ choices = g_new0 (char *, length + 1);
+ choices_display = g_new0 (char *, length + 1);
i = 0;
for (iter = ipp_choices; iter != NULL; iter = iter->next)
diff -Nru gtk4-4.18.5+ds/NEWS gtk4-4.18.6+ds/NEWS
--- gtk4-4.18.5+ds/NEWS 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/NEWS 2025-06-09 21:44:13.000000000 +0100
@@ -1,3 +1,22 @@
+Overview of Changes in 4.18.6, 09-06-2025
+=========================================
+
+* Bugs fixed:
+ - #7450 Wrong behavior of GdkKeymap on macOS (Elisa Pau)
+ - !8528 4.18.5 (Matthias Clasen)
+ - !8595 cups: NULL-terminate array of choices (Marek Kasik)
+ - !8610 Fix the android build (Florian "sp1rit")
+ - !8657 icontheme: Load the missing image icon from the theme (Sebastian
+ Wiesner, Benjamin Otte, Robert Mader, Zander Brown, James Westman, Tait
+ Hoyem, Matthias Clasen)
+
+* Translation updates:
+ - Catalan (Jordi Mas i Hernandez)
+ - Finnish (Jiri Grönroos)
+ - German (Christian Kirbach)
+ - Hebrew (Yaron Shahrabani)
+ - Slovak (Peter Mráz)
+
Overview of Changes in 4.18.5, 03-05-2025
=========================================
diff -Nru gtk4-4.18.5+ds/testsuite/gsk/path-special-cases.c gtk4-4.18.6+ds/testsuite/gsk/path-special-cases.c
--- gtk4-4.18.5+ds/testsuite/gsk/path-special-cases.c 2025-05-03 18:27:58.000000000 +0100
+++ gtk4-4.18.6+ds/testsuite/gsk/path-special-cases.c 2025-06-09 21:44:13.000000000 +0100
@@ -225,6 +225,39 @@
{ "M 10 20, M 10 20", NULL },
{ "M 10 20, M 10 20", NULL },
{ "M 10 20, ", NULL },
+
+ /* The following are not part of the rsvg tests */
+
+ // an icon that was triggering broken handling of 'm'
+ // Note that the output here is using 'M' to ensure the expected rendering
+ { "M 4 1 c -1.660156 0 -3 1.339844 -3 3 v 8 c 0 1.660156 1.339844 3 3 3 h 8 c 1.660156 0 3 -1.339844 3 -3 v -8 c 0 -1.660156 -1.339844 -3 -3 -3 z m 0 6 h 8 v 2 h -8 z m 0 0", "m 4 1 c -1.660156 0 -3 1.339844 -3 3 v 8 c 0 1.660156 1.339844 3 3 3 h 8 c 1.660156 0 3 -1.339844 3 -3 v -8 c 0 -1.660156 -1.339844 -3 -3 -3 z M 4 7 h 8 v 2 h -8 z m 0 0" },
+ // another icon that was triggering broken handling of custom contours
+ // Note that the output here is using 'M' to ensure the expected rendering
+ { "m 2 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z "
+ "m 8 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z "
+ "m -8 2 h 3 v 3 h -3 z "
+ "m 8 0 h 3 v 3 h -3 z "
+ "m -8 6 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z "
+ "m 8 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z "
+ "m -8 2 h 3 v 3 h -3 z "
+ "m 8 0 h 3 v 3 h -3 z",
+
+ "M 2 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z "
+ "M 10 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z "
+ "M 2 2 h 3 v 3 h -3 z "
+ "M 10 2 h 3 v 3 h -3 z "
+ "M 2 8 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z "
+ "M 10 8 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z "
+ "M 2 10 h 3 v 3 h -3 z "
+ "M 10 10 h 3 v 3 h -3 z" },
+ // omitted commands
+ { "M 10 10 20 30 z", "M 10 10 L 20 30 z" },
+ { "M 10 10 c 1 2 3 4 5 6 4 2 1 0 2 2 z",
+ "M 10 10 c 1 2 3 4 5 6 c 4 2 1 0 2 2 z" },
+ { "M 1 2 A 1 2 3 1 16 7 1 2 3 1 16 7", "path" },
+ // unclosed subpath
+ { "M 10 10 20 30 20 10 10 10 M 40 40 50 50 50 40 Z m 20 0 h 4 v 4 h -4 z",
+ "M 10 10 20 30 20 10 10 10 M 40 40 50 50 50 40 Z M 60 40 h 4 v 4 h -4 z" },
};
int i;
Reply to: