lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.28k stars 161 forks source link

Hotkey closing two tabs #218

Closed Dreadeath closed 8 years ago

Dreadeath commented 8 years ago

Hi, after some time of work, hotkey for closing tab starting to close two tabs in a row. If I rebind hotkey for closing, it starts working as expected. I didn't catch in what circumstances it begins to happen, but definitely not right after start, something triggers this behavior. I use latest Gnome.

newsgrep commented 8 years ago

same here with i3wm. Not sure yet how to reproduce that one.

lanoxx commented 8 years ago

I have observed this behaviour too but since I do not know what triggers it, its quote difficult to find the source of this problem.

lanoxx commented 8 years ago

Hmm, maybe maybe this bug starts to appear after tabs are reordered, can anyone confirm this?

lanoxx commented 8 years ago

Another idea would be that it only happens when the context menu has previously been opened.

newsgrep commented 8 years ago

Tested with tilda default settings. When I open the context menu (does not matter with mice or keyboard) then CTRL+w beginn to always closes two tabs. Closing tabs over the context menu is not affected by that. If I rebind the hotkey for closing to something_random the closing behavior is back to normal, it does not return by switching back to the default keybinding. And I do not know how to trigger the bug once more.

Moving tabs around does not trigger it.

by the way: When I configure tilda to not close after the last tab is closed but to respawn and then open tilda and press CTRL+W (so it closes and starts a new terminal) I get this message twice: (tilda:25744): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'VteTerminal'

(tilda:25744): Vte-CRITICAL : const char vte_terminal_get_window_title(VteTerminal): assertion 'VTE_IS_TERMINAL(terminal)' failed

plus once more for every tab that I had created while using tilda.

Dreadeath commented 8 years ago

Another idea would be that it only happens when the context menu has previously been opened.

This :) Also confirming newsgrep's description or that bug.

lanoxx commented 8 years ago

I think I need to change the way the context menu is shown. Currently its being recreated everytime the menu is shown and not properly destroyed afterwards. Probably thats somehow causing this strange behavior.

lanoxx commented 8 years ago

I have pushed a commit to a wip branch, it seems that this fixes the issue, but I am currently quite uncertain as to why it fixes it and so I currently do not want to commit to master. If you like you can try out my branch in the mean time while I try to understand this issue a little better.

newsgrep commented 8 years ago

now CTRL+W is only working after having opened the context menu at least once. before opening the context menu it does not work at all.

when I use tilda -C to open the Wizard (without the context menu) and I assign lets say 'e' as the key to close a tab, then I can type 'e' into the terminal. Like normal. But when I open the context menu and press key 'e' after that then the tab gets closed.

lanoxx commented 8 years ago

I will try to investigate this more deeply. Unfortunately I currently have no other idea.

lanoxx commented 8 years ago

@newsgrep I have pushed a new commit, this one should hopefully work better. If you can confirm that it works I will merge it into master. I have force-pushed my wip branch, so you will have to reset it on your side.

lanoxx commented 8 years ago

I just pushed it to master, in case there is still a problem please reopen.

pik commented 8 years ago

btw - the fix for this causing the close-tab in the popup menu to break for me - I would work on a fix but I can't seem to replicate the original double tab close, if someone could provide steps to reproduce that would be great.

pik commented 8 years ago

Let's re-open this because as I mentioned the close-tab menu was broken by this and it seems double-tab might still not be fixed in some cases? #229 #232