Small fix in get_allocation override to prevent exceptions/hung process on exiting with close button.

This commit is contained in:
Stephen Boddy 2015-06-21 18:54:37 +02:00
parent 448d020cf1
commit d9ba9c41cf
1 changed files with 3 additions and 1 deletions

View File

@ -1511,7 +1511,9 @@ class Terminal(Gtk.VBox):
def get_allocation(self):
"""Get a real allocation which includes the bloody x and y coordinates (grumble, grumble)"""
alloc = super(Terminal, self).get_allocation()
alloc.x, alloc.y = self.translate_coordinates(self.get_toplevel(), 0, 0)
rv = self.translate_coordinates(self.get_toplevel(), 0, 0)
if rv:
alloc.x, alloc.y = rv
return alloc
# There now begins a great list of keyboard event handlers