blob: baa66e5195fc16be1282f5d3fd22cfbd3aced5f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
From 69e82e354de26cd7e6957b95740c724ed1c31c10 Mon Sep 17 00:00:00 2001
From: Andreas Henriksson <andreas@fatal.se>
Date: Mon, 25 Jul 2016 19:38:18 +0200
Subject: 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 file changed, 5 insertions(+)
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 *
--
cgit v0.12
|