aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGrégoire Jadi2013-07-16 19:39:19 +0200
committerGrégoire Jadi2013-07-16 19:39:19 +0200
commit53e29768677204cca7eeb012aa70740b14e1162b (patch)
tree4d4953aba7b8a5ddf615b4d3c6f0161de4fb0b98 /src
parent360a89e080197f6ea68ee7156dbac72db252f344 (diff)
downloademacs-53e29768677204cca7eeb012aa70740b14e1162b.tar.gz
emacs-53e29768677204cca7eeb012aa70740b14e1162b.zip
* src/xwidget.c (kill_buffer_xwidgets): Cleanup OSR GtkWidget when xwidget
are freed.
Diffstat (limited to 'src')
-rw-r--r--src/xwidget.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/xwidget.c b/src/xwidget.c
index fcebc85bba1..7834e5b0bea 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -1883,12 +1883,21 @@ xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix)
1883void 1883void
1884kill_buffer_xwidgets (Lisp_Object buffer) 1884kill_buffer_xwidgets (Lisp_Object buffer)
1885{ 1885{
1886 Lisp_Object tail, xw; 1886 Lisp_Object tail, xwidget;
1887 for (tail = Fget_buffer_xwidgets (buffer); CONSP (tail); tail = XCDR (tail)) 1887 for (tail = Fget_buffer_xwidgets (buffer); CONSP (tail); tail = XCDR (tail))
1888 { 1888 {
1889 xw = XCAR (tail); 1889 xwidget = XCAR (tail);
1890 Vxwidget_list = Fdelq (xw, Vxwidget_list); 1890 Vxwidget_list = Fdelq (xwidget, Vxwidget_list);
1891 /* TODO free the GTK things in xw */ 1891 /* TODO free the GTK things in xw */
1892 {
1893 CHECK_XWIDGET (xwidget);
1894 struct xwidget *xw = XXWIDGET (xwidget);
1895 if (xw->widget_osr && xw->widgetwindow_osr)
1896 {
1897 gtk_widget_destroy(GTK_WIDGET (xw->widget_osr));
1898 gtk_widget_destroy(GTK_WIDGET (xw->widgetwindow_osr));
1899 }
1900 }
1892 } 1901 }
1893} 1902}
1894 1903