[dia] Bug 694892 - Windows [X] from drawing window leaves zombie



commit 6383a8637f044d499388302fa900aaba0b112c88
Author: Hans Breuer <hans breuer org>
Date:   Sat Mar 16 17:44:23 2013 +0100

    Bug 694892 - Windows [X] from drawing window leaves zombie
    
    With preference "Keep toolbox on top of diagram windows" the toolbox
    followed closing of the diagram window. This was due to still being
    transient. We have to break the connection between both windows
    otherwise the toolbox will go but the application wont exit.

 app/display.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/app/display.c b/app/display.c
index 65fa44c..04049f6 100644
--- a/app/display.c
+++ b/app/display.c
@@ -1253,6 +1253,11 @@ ddisp_destroy(DDisplay *ddisp)
 
   ddisplay_im_context_preedit_reset(ddisp, get_active_focus((DiagramData *) ddisp->diagram));
 
+  if (GTK_WINDOW(ddisp->shell) == gtk_window_get_transient_for(GTK_WINDOW(interface_get_toolbox_shell()))) {
+    /* we have to break the connection otherwise the toolbox will be closed */
+    gtk_window_set_transient_for(GTK_WINDOW(interface_get_toolbox_shell()), NULL);
+  }
+
   /* This calls ddisplay_really_destroy */
   if (ddisp->is_standalone_window)
     gtk_widget_destroy (ddisp->shell);
@@ -1315,7 +1320,7 @@ ddisplay_close(DDisplay *ddisp)
   g_return_if_fail(ddisp != NULL);
 
   dia = ddisp->diagram;
-  
+
   if ( (g_slist_length(dia->displays) > 1) ||
        (!diagram_is_modified(dia)) ) {
     ddisp_destroy(ddisp);


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