diff --git a/ChangeLog b/ChangeLog index 7968494872..b210b8251b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2001-09-07 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_lines): remove some + debug code that seems to have caused a breakpoint in valid cases + + * gtk/gtktextbtree.c (_gtk_text_btree_add_view): set the prev + pointer on the first view when adding the second view, fixes + crash when closing gtk-demo text test with active selection + + * gtk/gtktextbuffer.c + (gtk_text_buffer_remove_selection_clipboard): don't leave dead + clipboards in the list of clipboards - probably fixes #59836 + Fri Sep 7 11:51:44 2001 Owen Taylor Make gdkx.h the only installed header from gdk/x11. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 7968494872..b210b8251b 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,16 @@ +2001-09-07 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_lines): remove some + debug code that seems to have caused a breakpoint in valid cases + + * gtk/gtktextbtree.c (_gtk_text_btree_add_view): set the prev + pointer on the first view when adding the second view, fixes + crash when closing gtk-demo text test with active selection + + * gtk/gtktextbuffer.c + (gtk_text_buffer_remove_selection_clipboard): don't leave dead + clipboards in the list of clipboards - probably fixes #59836 + Fri Sep 7 11:51:44 2001 Owen Taylor Make gdkx.h the only installed header from gdk/x11. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7968494872..b210b8251b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,16 @@ +2001-09-07 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_lines): remove some + debug code that seems to have caused a breakpoint in valid cases + + * gtk/gtktextbtree.c (_gtk_text_btree_add_view): set the prev + pointer on the first view when adding the second view, fixes + crash when closing gtk-demo text test with active selection + + * gtk/gtktextbuffer.c + (gtk_text_buffer_remove_selection_clipboard): don't leave dead + clipboards in the list of clipboards - probably fixes #59836 + Fri Sep 7 11:51:44 2001 Owen Taylor Make gdkx.h the only installed header from gdk/x11. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7968494872..b210b8251b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,16 @@ +2001-09-07 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_lines): remove some + debug code that seems to have caused a breakpoint in valid cases + + * gtk/gtktextbtree.c (_gtk_text_btree_add_view): set the prev + pointer on the first view when adding the second view, fixes + crash when closing gtk-demo text test with active selection + + * gtk/gtktextbuffer.c + (gtk_text_buffer_remove_selection_clipboard): don't leave dead + clipboards in the list of clipboards - probably fixes #59836 + Fri Sep 7 11:51:44 2001 Owen Taylor Make gdkx.h the only installed header from gdk/x11. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7968494872..b210b8251b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,16 @@ +2001-09-07 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_lines): remove some + debug code that seems to have caused a breakpoint in valid cases + + * gtk/gtktextbtree.c (_gtk_text_btree_add_view): set the prev + pointer on the first view when adding the second view, fixes + crash when closing gtk-demo text test with active selection + + * gtk/gtktextbuffer.c + (gtk_text_buffer_remove_selection_clipboard): don't leave dead + clipboards in the list of clipboards - probably fixes #59836 + Fri Sep 7 11:51:44 2001 Owen Taylor Make gdkx.h the only installed header from gdk/x11. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7968494872..b210b8251b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,16 @@ +2001-09-07 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_lines): remove some + debug code that seems to have caused a breakpoint in valid cases + + * gtk/gtktextbtree.c (_gtk_text_btree_add_view): set the prev + pointer on the first view when adding the second view, fixes + crash when closing gtk-demo text test with active selection + + * gtk/gtktextbuffer.c + (gtk_text_buffer_remove_selection_clipboard): don't leave dead + clipboards in the list of clipboards - probably fixes #59836 + Fri Sep 7 11:51:44 2001 Owen Taylor Make gdkx.h the only installed header from gdk/x11. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7968494872..b210b8251b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,16 @@ +2001-09-07 Havoc Pennington + + * gtk/gtktextlayout.c (gtk_text_layout_get_lines): remove some + debug code that seems to have caused a breakpoint in valid cases + + * gtk/gtktextbtree.c (_gtk_text_btree_add_view): set the prev + pointer on the first view when adding the second view, fixes + crash when closing gtk-demo text test with active selection + + * gtk/gtktextbuffer.c + (gtk_text_buffer_remove_selection_clipboard): don't leave dead + clipboards in the list of clipboards - probably fixes #59836 + Fri Sep 7 11:51:44 2001 Owen Taylor Make gdkx.h the only installed header from gdk/x11. diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 492bcae830..5a7fe85d26 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -1395,6 +1395,12 @@ _gtk_text_btree_add_view (GtkTextBTree *tree, view->next = tree->views; view->prev = NULL; + if (tree->views) + { + g_assert (tree->views->prev == NULL); + tree->views->prev = view; + } + tree->views = view; /* The last line in the buffer has identity values for the per-view @@ -1453,6 +1459,9 @@ _gtk_text_btree_remove_view (GtkTextBTree *tree, gtk_text_btree_node_remove_view (view, tree->root_node, view_id); + view->layout = (gpointer) 0xdeadbeef; + view->view_id = (gpointer) 0xdeadbeef; + g_free (view); } @@ -3276,7 +3285,7 @@ _gtk_text_line_remove_data (GtkTextLine *line, gpointer _gtk_text_line_get_data (GtkTextLine *line, - gpointer view_id) + gpointer view_id) { GtkTextLineData *iter; diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index df584961aa..4195610e44 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -3069,6 +3069,9 @@ gtk_text_buffer_remove_selection_clipboard (GtkTextBuffer *buffer, { if (gtk_clipboard_get_owner (selection_clipboard->clipboard) == G_OBJECT (buffer)) gtk_clipboard_clear (selection_clipboard->clipboard); + + buffer->selection_clipboards = g_slist_remove (buffer->selection_clipboards, + selection_clipboard); g_free (selection_clipboard); } diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index c1aba56b14..bcb10912e3 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -586,12 +586,6 @@ gtk_text_layout_get_lines (GtkTextLayout *layout, _gtk_text_btree_line_count (_gtk_text_buffer_get_btree (layout->buffer)) - 1, NULL); - { - GtkTextLineData *ld = _gtk_text_line_get_data (last_btree_line, layout); - if (ld->height == 0) - G_BREAKPOINT (); - } - g_assert (last_btree_line != NULL); line = first_btree_line;