]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix last change for GTK 2
authorPo Lu <luangruo@yahoo.com>
Tue, 19 Apr 2022 03:18:25 +0000 (11:18 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 19 Apr 2022 03:18:25 +0000 (11:18 +0800)
* src/xfns.c (x_set_alpha_background):
* src/xterm.c (x_update_opaque_region): Move some ifdefs around.

src/xfns.c
src/xterm.c

index 9ceba98f67dcc4c4f45e4c5d4adca4a174705eef..c7e2984ce13840c1acd33dc17da91076d25c1a8f 100644 (file)
@@ -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
index b5b2fe32947648893699468b280a80ff0d311619..c4652c19c66a68290891d2afc3ce34a465a80a5c 100644 (file)
@@ -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 ();
 }