Fixed Issue #425 (hide_window will try to show a destroyed window)

This commit is contained in:
Vulcalien 2021-06-25 20:40:12 +02:00
parent 24f1503234
commit c9540023f1
1 changed files with 21 additions and 18 deletions

View File

@ -40,6 +40,7 @@ class Window(Container, Gtk.Window):
title = None
isfullscreen = None
ismaximised = None
isDestroyed = False
hidebound = None
hidefunc = None
losefocus_time = 0
@ -302,12 +303,14 @@ class Window(Container, Gtk.Window):
terminal.close()
self.cnxids.remove_all()
self.terminator.deregister_window(self)
self.isDestroyed = True
self.destroy()
del(self)
def on_hide_window(self, data=None):
"""Handle a request to hide/show the window"""
if not self.isDestroyed:
if not self.get_property('visible'):
#Don't show if window has just been hidden because of
#lost focus