From 92667cc2fb17af947c202d2de765d8736679e858 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 19 Apr 2022 11:18:25 +0800 Subject: [PATCH] Fix last change for GTK 2 * src/xfns.c (x_set_alpha_background): * src/xterm.c (x_update_opaque_region): Move some ifdefs around. --- src/xfns.c | 2 +- src/xterm.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/xfns.c b/src/xfns.c index 9ceba98f67d..c7e2984ce13 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -732,7 +732,7 @@ x_set_alpha_background (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { unsigned long opaque_region[] = {0, 0, FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f)}; -#ifdef USE_GTK +#ifdef HAVE_GTK3 GObjectClass *object_class; GtkWidgetClass *class; #endif diff --git a/src/xterm.c b/src/xterm.c index b5b2fe32947..c4652c19c66 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3790,6 +3790,10 @@ x_update_opaque_region (struct frame *f, XEvent *configure) (configure ? configure->xconfigure.height : FRAME_PIXEL_HEIGHT (f))}; +#ifdef HAVE_GTK3 + GObjectClass *object_class; + GtkWidgetClass *class; +#endif if (!FRAME_DISPLAY_INFO (f)->alpha_bits) return; @@ -3815,6 +3819,14 @@ x_update_opaque_region (struct frame *f, XEvent *configure) FRAME_DISPLAY_INFO (f)->Xatom_net_wm_opaque_region, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opaque_region, 4); + else + { + object_class = G_OBJECT_GET_CLASS (FRAME_GTK_OUTER_WIDGET (f)); + class = GTK_WIDGET_CLASS (object_class); + + if (class->style_updated) + class->style_updated (FRAME_GTK_OUTER_WIDGET (f)); + } #endif unblock_input (); } -- 2.39.2