Skip to content

Commit 7682c9d

Browse files
zainengineerkaiw
authored andcommitted
Fix: bgo #753358 stderr errors when Alt-F4 is used
Problem: When meld is launched from console, usecase is git difftool, After closing App using Alt+F4 console displays multiple error messages Error Messages look like (meld:18521): Gtk-CRITICAL **: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed Cause: closing window triggers do_window_removed Unlike when Quit is choosen from Menu, self.quit() is never called Gtk complains and adds error messages on STDERR Solution: When do_window_removed is called check if there are any active windows If there is no active window, call self.quit()
1 parent 7dcfef0 commit 7682c9d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

meld/meldapp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ def done(tab, status):
9898
def do_window_removed(self, widget):
9999
widget.meldwindow = None
100100
Gtk.Application.do_window_removed(self, widget)
101+
if not len(self.get_windows()):
102+
self.quit()
101103

102104
# We can't override do_local_command_line because it has no introspection
103105
# annotations: https://bugzilla.gnome.org/show_bug.cgi?id=687912

0 commit comments

Comments
 (0)