Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

Vulcalien
Copy link
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
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.

None yet

2 participants