[Xfce4-commits] [apps/mousepad] 01/01: Fix crash when dragging tab to root window

noreply at xfce.org noreply at xfce.org
Tue Aug 15 05:26:34 CEST 2017


This is an automated email from the git hooks/post-receive script.

m   b   r   u   s   h       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/mousepad.

commit e3718b23026117ef653a539f504c13d6a672fd7f
Author: Matthew Brush <matt at xfce.org>
Date:   Mon Aug 14 20:17:02 2017 -0700

    Fix crash when dragging tab to root window
    
    Some changes on GTK+3 after 3.10 caused the existing code to crash. A
    new function which fixes the problem was added in 3.16. Use the new
    gtk_notebook_detach() tab in versions after 3.16 where it's available.
    
    See GTK+ bug: https://bugzilla.gnome.org/show_bug.cgi?id=744385
    
    Workaround found in: https://github.com/f2404/xfce4-terminal3/commit/06eace541aa4bd93d7e5204a856467cdf76de104
    
    Fixes #13336
---
 mousepad/mousepad-window.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c
index a3fda7a..9e56749 100644
--- a/mousepad/mousepad-window.c
+++ b/mousepad/mousepad-window.c
@@ -2089,7 +2089,14 @@ mousepad_window_notebook_create_window (GtkNotebook    *notebook,
       g_object_ref (G_OBJECT (document));
 
       /* remove the document from the active window */
+#if GTK_CHECK_VERSION (3, 16, 0)
+      gtk_notebook_detach_tab (GTK_CONTAINER (window->notebook), page);
+#else
+      /* crashes on GTK+ 3 somewhere between 3.10-3.16
+       * Fixed above using new function added in 3.16
+       * See: https://bugzilla.gnome.org/show_bug.cgi?id=744385 */
       gtk_container_remove (GTK_CONTAINER (window->notebook), page);
+#endif
 
       /* emit the new window with document signal */
       g_signal_emit (G_OBJECT (window), window_signals[NEW_WINDOW_WITH_DOCUMENT], 0, document, x, y);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list