Merge pull request #456 from Vulcalien/master
Fixed Issue #425 (hide_window will try to show a destroyed window)
This commit is contained in:
commit
2d38070474
|
@ -40,6 +40,7 @@ class Window(Container, Gtk.Window):
|
||||||
title = None
|
title = None
|
||||||
isfullscreen = None
|
isfullscreen = None
|
||||||
ismaximised = None
|
ismaximised = None
|
||||||
|
isDestroyed = False
|
||||||
hidebound = None
|
hidebound = None
|
||||||
hidefunc = None
|
hidefunc = None
|
||||||
losefocus_time = 0
|
losefocus_time = 0
|
||||||
|
@ -302,12 +303,14 @@ class Window(Container, Gtk.Window):
|
||||||
terminal.close()
|
terminal.close()
|
||||||
self.cnxids.remove_all()
|
self.cnxids.remove_all()
|
||||||
self.terminator.deregister_window(self)
|
self.terminator.deregister_window(self)
|
||||||
|
self.isDestroyed = True
|
||||||
self.destroy()
|
self.destroy()
|
||||||
del(self)
|
del(self)
|
||||||
|
|
||||||
def on_hide_window(self, data=None):
|
def on_hide_window(self, data=None):
|
||||||
"""Handle a request to hide/show the window"""
|
"""Handle a request to hide/show the window"""
|
||||||
|
|
||||||
|
if not self.isDestroyed:
|
||||||
if not self.get_property('visible'):
|
if not self.get_property('visible'):
|
||||||
#Don't show if window has just been hidden because of
|
#Don't show if window has just been hidden because of
|
||||||
#lost focus
|
#lost focus
|
||||||
|
|
Loading…
Reference in New Issue