From 0bc1fc98a5f3cd1dd149cdb9ad30b826a4b54cbf Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Fri, 16 Jan 2015 18:30:29 +0100 Subject: [PATCH] TabDecorator: Invalidate all tabs when updating a title Signed-off-by: Adrien Destugues Fixes #8569 I'm not sure if this works properly if you reorder tabs (see #9175). But the fix for that is reordering the tab list to match the visible order, which doesn't affect this part of the code. --- src/servers/app/decorator/TabDecorator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/servers/app/decorator/TabDecorator.cpp b/src/servers/app/decorator/TabDecorator.cpp index d7c32898c4..0d295a0195 100644 --- a/src/servers/app/decorator/TabDecorator.cpp +++ b/src/servers/app/decorator/TabDecorator.cpp @@ -465,14 +465,16 @@ TabDecorator::_SetTitle(Decorator::Tab* tab, const char* string, { // TODO: we could be much smarter about the update region - BRect rect = TabRect(tab); + BRect rect = TabRect((int32) 0) | TabRect(CountTabs() - 1); + // Get a rect of all the tabs _DoLayout(); if (updateRegion == NULL) return; - rect = rect | TabRect(tab); + rect = rect | TabRect(CountTabs() - 1); + // Update the rect to guarantee it updates all the tabs rect.bottom++; // the border will look differently when the title is adjacent