Skip to content

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

Merged
mattrose merged 1 commit intognome-terminator:masterfrom
Vulcalien:master
Jul 2, 2021
Merged

Fixed Issue #425 (hide_window will try to show a destroyed window)#456
mattrose merged 1 commit intognome-terminator:masterfrom
Vulcalien:master

Conversation

@Vulcalien
Copy link
Copy Markdown
Member

The problem

The function on_hide_window is called even if the window was destroyed.

More details

On line 135 we bind that function using Keybinder.bind(...), but never "unbind" it. Now, since all the terminator windows are run by one python process, this key binding remains until all windows are closed. So what happens is that when the key combination for hide_window is typed, on_hide_window is called even if the window was destroyed.
The first thing I tried to do was to unbind it, but this caused all the windows to lose the binding, so that hide_window would not work anymore at all.

Solution

Simply store in a variable isDestroyed the value True when the window is destroyed, and do nothing if on_hide_window is called.

@mattrose
Copy link
Copy Markdown
Member

mattrose commented Jul 2, 2021

This looks good, and might fix a lot of niggling issues that I haven't been able to track down. I'll pull it down and take a look at it, but assuming everything is fine I'll likely merge it in tonight.

@mattrose mattrose merged commit 2d38070 into gnome-terminator:master Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants