From 092215bd641abc6bcb8086cf55ec8679187f1db2 Mon Sep 17 00:00:00 2001 From: Lincoln de Sousa Date: Wed, 23 Jun 2010 14:15:21 -0300 Subject: [PATCH] Calling the hide() method when closing main window (Closes: #229) --- src/guake.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/guake.py b/src/guake.py index 9a7dab40..6214fb20 100644 --- a/src/guake.py +++ b/src/guake.py @@ -599,6 +599,13 @@ class Guake(SimpleGladeApp): self.get_widget('tab-menu').connect('hide', hide_context_menu) self.window.connect('focus-out-event', self.on_window_losefocus) + # Handling the delete-event of the main window to avoid + # problems when closing it. + def destroy(*args): + self.hide() + return True + self.window.connect('delete-event', destroy) + # Flag to completly disable losefocus hiding self.disable_losefocus_hiding = False