]> git.eshelyaron.com Git - emacs.git/commitdiff
Destroy GTK tool bar widget if it was never attached (bug#75636)
authorPip Cet <pipcet@protonmail.com>
Wed, 22 Jan 2025 00:51:33 +0000 (00:51 +0000)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 Jan 2025 10:25:03 +0000 (11:25 +0100)
* src/gtkutil.c (xg_free_frame_widgets): Call gtk_widget_destroy on an
unpacked toolbar widget.

(cherry picked from commit 6ea1e03fe7f9e49387789c86b8f91f6333de679c)

src/gtkutil.c

index 171ffee1bd007488717ac4ef588a12248a222815..a1a2c6cbd20376d15efc9f293d76a52a252b4240 100644 (file)
@@ -1884,6 +1884,12 @@ xg_free_frame_widgets (struct frame *f)
       if (tbinfo)
         xfree (tbinfo);
 
+      if (x->toolbar_widget && !x->toolbar_is_packed)
+       {
+         gtk_widget_destroy (x->toolbar_widget);
+         x->toolbar_widget = NULL;
+       }
+
       /* x_free_frame_resources should have taken care of it */
 #ifndef HAVE_PGTK
 #ifdef HAVE_XDBE