From 7314c12e64ef5b185e3fd52d8dc1111eb730bdad Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 6 Dec 2021 13:43:23 +0800 Subject: [PATCH] Fix child frame crash on pgtk * src/gtkutil.c (xg_check_special_colors): Use `FRAME_WIDGET' on PGTK. --- src/gtkutil.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gtkutil.c b/src/gtkutil.c index d872d393caf..225984af41a 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -684,8 +684,13 @@ xg_check_special_colors (struct frame *f, block_input (); { #ifdef HAVE_GTK3 +#ifndef HAVE_PGTK GtkStyleContext *gsty = gtk_widget_get_style_context (FRAME_GTK_OUTER_WIDGET (f)); +#else + GtkStyleContext *gsty + = gtk_widget_get_style_context (FRAME_WIDGET (f)); +#endif GdkRGBA col; char buf[sizeof "rgb://rrrr/gggg/bbbb"]; int state = GTK_STATE_FLAG_SELECTED|GTK_STATE_FLAG_FOCUSED; -- 2.39.5