rem: int tx, ty;
add: int ty;
context: paintTabView(TabView *tPtr){    Pixmap buffer;    WMScreen *scr = W_VIEW(tPtr)->screen;    Display *dpy = scr->display;    GC white = WMColorGC(scr->white);    int i;    if (tPtr->flags.type == WTTopTabsBevelBorder) {	int count = tPtr->visibleTabs;	int first = tPtr->firstVisible;	int moreAtLeft;	int moreAtRight;	int selectedIsVisible;	int tx, ty;	int twidth, theight;		ty = 2;	theight = tPtr->tabHeight;		buffer = XCreatePixmap(dpy, W_VIEW(tPtr)->window,			       W_VIEW(tPtr)->size.width, theight,			       W_VIEW(tPtr)->screen->depth);		XFillRectangle(dpy, buffer, WMColorGC(W_VIEW(tPtr)->backColor),		       0, 0, W_VIEW(tPtr)->size.width, tPtr->tabHeight);	if (tPtr->flags.dontFitAll) {	    moreAtLeft = first > 0;	    moreAtRight = (first + count) < tPtr->itemCount;	    if (tPtr->selectedItem >= first		&& tPtr->selectedItem < first + count)		selectedIsVisible = 1;	    else		selectedIsVisible = 0;	} else {	    moreAtLeft = 0;	    moreAtRight = 0;	    selectedIsVisible = 1;	}	if (moreAtRight) {	    drawTab(tPtr, buffer, positionOfTab(tPtr, first+count), 0,		    W_VIEW_WIDTH(tPtr->view), theight, False);	}		for (i = first + count-1; i >= first; i--) {	    if (!selectedIsVisible || i != tPtr->selectedItem) {		twidth = W_TabViewItemTabWidth(tPtr->items[i]);		drawTab(tPtr, buffer, positionOfTab(tPtr, i), 0,			twidth, theight, False);	    }	}	if (moreAtLeft) {	    drawTab(tPtr, buffer, positionOfTab(tPtr, 0)-2*BUTTONED_SIDE_OFFSET,		    0, BUTTONED_SIDE_OFFSET*4, theight, False);	}		if (selectedIsVisible) {	    int idx = tPtr->selectedItem;	    drawTab(tPtr, buffer, positionOfTab(tPtr, idx),		    0, W_TabViewItemTabWidth(tPtr->items[idx]),		    theight, True);	    XDrawLine(dpy, buffer, white, 0, theight - 1,		      positionOfTab(tPtr, idx), theight - 1);	    XDrawLine(dpy, buffer, white, 		      positionOfTab(tPtr, idx) + W_TabViewItemTabWidth(tPtr->items[idx]),		      tPtr->tabHeight - 1, W_VIEW_WIDTH(tPtr->view) - 1,		      tPtr->tabHeight - 1);	} else {	    XDrawLine(dpy, buffer, white, 0, theight - 1,		      W_VIEW_WIDTH(tPtr->view), theight - 1);	    	}	for (i = 0; i < count; i++) {	    WMRect rect;	    	    rect.pos.x = 15 + positionOfTab(tPtr, first+i);	    rect.pos.y = ty;	    rect.size.width = W_TabViewItemTabWidth(tPtr->items[first+i]);	    rect.size.height = theight;	    W_DrawLabel(tPtr->items[first+i], buffer, rect, 			tPtr->flags.enabled);	}	if (moreAtLeft) {	    paintDot(tPtr, buffer, 4, 10);	    paintDot(tPtr, buffer, 7, 10);	    paintDot(tPtr, buffer, 10, 10);	}	if (moreAtRight) {	    int x;	    	    x = positionOfTab(tPtr, tPtr->firstVisible + tPtr->visibleTabs);	    x = x + (W_VIEW_WIDTH(tPtr->view) - x)/2;	    paintDot(tPtr, buffer, x + 5, 10);	    paintDot(tPtr, buffer, x + 8, 10);	    paintDot(tPtr, buffer, x + 11, 10);	}		XCopyArea(dpy, buffer, W_VIEW(tPtr)->window, scr->copyGC, 0, 0,		  W_VIEW_WIDTH(tPtr->view), theight, 0, 0);	XFreePixmap(dpy, buffer);    }    switch (tPtr->flags.type) {     case WTTopTabsBevelBorder:	drawRelief(scr, W_VIEW(tPtr)->window, 0, tPtr->tabHeight - 1,		   W_VIEW(tPtr)->size.width,		   W_VIEW(tPtr)->size.height - tPtr->tabHeight + 1);	break;     case WTNoTabsBevelBorder:	W_DrawRelief(scr, W_VIEW(tPtr)->window, 0, 0, W_VIEW(tPtr)->size.width,		     W_VIEW(tPtr)->size.height, WRRaised);	break;     case WTNoTabsLineBorder:	W_DrawRelief(scr, W_VIEW(tPtr)->window, 0, 0, W_VIEW(tPtr)->size.width,		     W_VIEW(tPtr)->size.height, WRSimple);	break;     case WTNoTabsNoBorder:	break;    }}