Split GTK3 vs GTK2 setup in gtk_xtext_realize so GTK2-only parent window/colormap access is guarded under #if !HAVE_GTK3.

This commit is contained in:
2026-01-30 06:57:14 -07:00
parent fa3c7c9059
commit 3806b33aab

View File

@@ -880,7 +880,8 @@ gtk_xtext_realize (GtkWidget * widget)
parent_window = gtk_widget_get_parent_window (widget);
attributes.visual = gtk_widget_get_visual (widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
#else
#endif
#if !HAVE_GTK3
allocation = widget->allocation;
parent_window = widget->parent->window;
attributes.colormap = gtk_widget_get_colormap (widget);