gdk: let external engines find the area cairo helper

It's registered as type data on GdkDrawable, so the same engine still
loads into other GTK 2 builds and falls back to gdk_cairo_create()
there.
This commit is contained in:
Daemonratte 2026-10-17 01:37:38 +02:00
commit aa9939264e

View file

@ -84,6 +84,13 @@ gdk_drawable_class_init (GdkDrawableClass *klass)
klass->get_visible_region = gdk_drawable_real_get_visible_region;
klass->draw_pixbuf = gdk_drawable_real_draw_pixbuf;
klass->draw_drawable = gdk_drawable_real_draw_drawable;
/* how theme engines built outside GTK+, which must load into other
* builds of GTK+ 2 too, find gdk_cairo_create_in_area_libgtk_only():
* where this is not set they use gdk_cairo_create() */
g_type_set_qdata (G_TYPE_FROM_CLASS (klass),
g_quark_from_static_string ("gdk-cairo-create-in-area"),
(gpointer) gdk_cairo_create_in_area_libgtk_only);
}
static void