Index: tab.c =================================================================== --- tab.c (Revision 3581) +++ tab.c (Arbeitskopie) @@ -1277,7 +1277,7 @@ * */ static void -groupRecalcSlotPos(GroupTabBarSlot *slot, int slotPos) +groupRecalcSlotPos(GroupTabBarSlot *slot, int slotPos, float scale) { GROUP_WINDOW (slot->window); GROUP_SCREEN (slot->window->screen); @@ -1292,11 +1292,11 @@ EMPTY_REGION(slot->region); - box.x = border_width + ((thumb_size + border_width) * slotPos); - box.y = border_width; + box.x = (border_width + ((thumb_size + border_width) * slotPos)) * scale; + box.y = border_width * scale; - box.width = thumb_size; - box.height = thumb_size; + box.width = thumb_size * scale; + box.height = thumb_size * scale; XUnionRectWithRegion(&box, slot->region, slot->region); @@ -1357,6 +1357,12 @@ if (isDraggedSlotGroup) bar_width -= border_width; //1 tab is missing, so we have 1 less border + float scale = 1.0f; + if (bar_width > WIN_WIDTH(topTab)) + scale = (float) WIN_WIDTH(topTab) / (float) bar_width; + + bar_width *= scale; + if (maxX2 - minX1 < bar_width) box.x = (maxX2 + minX1)/2 - bar_width / 2; else if (middleX - bar_width/2 < minX1) @@ -1372,7 +1378,7 @@ EMPTY_REGION(bar->region); XUnionRectWithRegion(&box, bar->region, bar->region); - + // recalc every slot region currentSlot = 0; for(slot = bar->slots; slot; slot = slot->next) @@ -1380,7 +1386,7 @@ if(slot == gs->draggedSlot && gs->dragged) continue; - groupRecalcSlotPos (slot, currentSlot); + groupRecalcSlotPos (slot, currentSlot, scale); XOffsetRegion (slot->region, bar->region->extents.x1, bar->region->extents.y1);