[gnome-terminal/gnome-3-20] notebook: avoid crash on tab DND



commit 69e82e354de26cd7e6957b95740c724ed1c31c10
Author: Andreas Henriksson <andreas fatal se>
Date:   Mon Jul 25 19:38:18 2016 +0200

    notebook: avoid crash on tab DND
    
    See "gtk_notebook_detach_tab" API documentation. Using it instead
    of gtk_container_remove avoids an assertion crash in gtk+ when
    dragging and dropping a tab between terminal windows.
    
    See also original bug report at
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825818
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769161
    (cherry picked from commit 85b448f7c9e219e82d4d8abafe405d73349c08c1)

 src/terminal-notebook.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-notebook.c b/src/terminal-notebook.c
index 9d488fc..b054676 100644
--- a/src/terminal-notebook.c
+++ b/src/terminal-notebook.c
@@ -152,8 +152,13 @@ terminal_notebook_remove_screen (TerminalMdiContainer *container,
   update_tab_visibility (notebook, -1);
 
   screen_container = terminal_screen_container_get_from_screen (screen);
+#if GTK_CHECK_VERSION(3, 16, 0)
+  gtk_notebook_detach_tab (GTK_NOTEBOOK (notebook),
+                           GTK_WIDGET (screen_container));
+#else
   gtk_container_remove (GTK_CONTAINER (notebook),
                         GTK_WIDGET (screen_container));
+#endif
 }
 
 static TerminalScreen *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]