Opened 16 years ago
Last modified 13 months ago
#3753 assigned bug
The title of an inactive terminal tab isn't updated
Reported by: | heto | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | R1.1 |
Component: | Applications/Terminal | Version: | R1/pre-alpha1 |
Keywords: | gci2011 | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
If a command-line application updates the label of a deselected tab, the change is lost completely. The tab keeps displaying the old label even after it's selected, and the same old title becomes the window title.
Reproducing: Run the following command in one tab:
sleep 2; echo -e '\E]2;New Title\a'
then immediately switch to another tab. You'll see that the tab label does not get updated. If you switch back to the original tab after the two seconds have passed, you'll see that the command has finished, but both the window title and the tab title are still the old ones.
I'm pretty sure the bug is caused because deselecting a tab causes that tab's target view to be detached from the window. This causes the TermView to unset the listener in its TerminalBuffer. Now when TermParse calls TerminalBuffer::SetTitle to set the title, it does not have a listener to deliver the message to.
I wonder if the whole message passing could be replaced with a function call in this case. If not, the view has to be kept listening to messages from its buffer even if it's detached from a window.
Change History (5)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
I've been researching tabs lately for the browser project and I looked over the BTabView code, and it indeed will stop detaching views if a BCardLayout is present. It just delegates to the card layout to hide and show the views as the tabs are selected.
So as Stephan says switching to using layout management (well at least using a card layout) would probably fix this issue. Of course the terminal GUI does some off-by-one manual layout tricks to make the scrollbar look better and I am not sure how that would be affected by using layout management. Guess we will see if and when someone tries.
comment:3 by , 13 years ago
Keywords: | gci2011 added |
---|
The problem was checked during GCI 2011. Terminal still haves the same way, as provided in description on hrev43238. I have also checked if there is nothing wrong with example command itself, but it works fine, if the tab is focused during execution.
comment:4 by , 4 years ago
Milestone: | R1 → R1.1 |
---|
comment:5 by , 13 months ago
Owner: | removed |
---|---|
Status: | new → assigned |
Actually, I think this whole detaching/attaching of views which BTabView does is a design flaw of BeOS which we inherited (and it shows in exactly these situations). Unfortunately some applications may actually depend on it. But what we could do is change the behavior when layout-management is used. In that case we should use hiding/showing of the views. (Which may actually be the case already, now that I think of it...) In that case, the solution to this particular problem would be to convert Terminal to use layout-management.