]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix child frame crash on pgtk
authorPo Lu <luangruo@yahoo.com>
Mon, 6 Dec 2021 05:43:23 +0000 (13:43 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 6 Dec 2021 05:43:23 +0000 (13:43 +0800)
* src/gtkutil.c (xg_check_special_colors): Use `FRAME_WIDGET'
on PGTK.

src/gtkutil.c

index d872d393caf5a2adef6663b7ba5a265b5c9544cc..225984af41adffcddb6b4d8a9e0982b4edd21dab 100644 (file)
@@ -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;