Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!ATHENA.MIT.EDU!jfc From: jfc@ATHENA.MIT.EDU (John Carr) Newsgroups: comp.windows.x Subject: Re: IBM 4.3 RT X11R4 megapel bugs Message-ID: <9004120655.AA01893@ACHATES.MIT.EDU> Date: 12 Apr 90 06:55:06 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 131 I wasn't able to reproduce the problem with the server crashing. Either it's fixed in the server I'm running, or I'm missing the right lines from .twmrc (I don't normally use twm, so I copied system.twmrc and added the line "ShowIconManager"). A stack trace, even without full debugging symbols, would be helpful. I've found a fix for the problems with Andrew (they are in the IBM ppc code, and should apply to any of the IBM color servers). The problems are: 1. Clip calculations on clients with multiple windows sharing a GC (and possibly in other cases) are wrong. 2. Rectangles smaller than line width are drawn incorrectly (no check for (height - lineWidth / 2) negative). *** /tmp/,RCSt1001812 Thu Apr 12 02:45:45 1990 --- ppcGC.c Thu Apr 12 02:45:46 1990 *************** *** 273,278 **** --- 273,279 ---- ppcScrnPriv *devScrnPriv = pGC->pScreen->devPrivate ; WindowPtr pWin ; Mask bsChanges = 0 ; + int oldx, oldy; devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGCPrivateIndex].ptr ) ; *************** *** 286,301 **** ibmAbort(); } ! if ( pDrawable->type == DRAWABLE_WINDOW ) { ! pWin = (WindowPtr) pDrawable ; ! pGC->lastWinOrg.x = pWin->drawable.x ; ! pGC->lastWinOrg.y = pWin->drawable.y ; ! } ! else { ! pWin = (WindowPtr) NULL ; ! pGC->lastWinOrg.x = 0 ; ! pGC->lastWinOrg.y = 0 ; ! } changes &= ppcGCInterestValidateMask ; /* If Nothing REALLY Changed, Just Return */ --- 287,297 ---- ibmAbort(); } ! pWin = (pDrawable->type == DRAWABLE_WINDOW) ? (WindowPtr) pDrawable : (WindowPtr) NULL; ! oldx = pGC->lastWinOrg.x; ! oldy = pGC->lastWinOrg.y; ! pGC->lastWinOrg.x = pDrawable->x; ! pGC->lastWinOrg.y = pDrawable->y; changes &= ppcGCInterestValidateMask ; /* If Nothing REALLY Changed, Just Return */ *************** *** 318,327 **** the window has moved we need to (re)translate it. */ ! if ( ( pGC->clientClipType == CT_REGION ) ! && ( ( changes & ( GCClipXOrigin | GCClipYOrigin | GCClipMask ) ) ! || ( ( pGC->lastWinOrg.x != pGC->lastWinOrg.x ) ! || ( pGC->lastWinOrg.y != pGC->lastWinOrg.y ) ) ) ) { /* retranslate client clip */ (* pGC->pScreen->TranslateRegion)( --- 314,323 ---- the window has moved we need to (re)translate it. */ ! if ((pGC->clientClipType == CT_REGION) && ! ((changes & (GCClipXOrigin | GCClipYOrigin | GCClipMask)) || ! ((pGC->lastWinOrg.x != oldx) || ! (pGC->lastWinOrg.y != oldy)))) { /* retranslate client clip */ (* pGC->pScreen->TranslateRegion)( *** /tmp/,RCSt1001837 Thu Apr 12 02:47:59 1990 --- ppcPolyRec.c Thu Apr 12 02:48:00 1990 *************** *** 71,76 **** --- 71,82 ---- for (i=0; iheight; + tmp = (tmp - lw > 0) ? (tmp - lw) : 0; + tmprects->x = pR->x - ss; tmprects->y = pR->y - ss; tmprects->width = pR->width + lw; *************** *** 80,92 **** tmprects->x = pR->x - ss; tmprects->y = pR->y + fs; tmprects->width = lw; ! tmprects->height = pR->height - lw; tmprects++; tmprects->x = pR->x + pR->width - ss; tmprects->y = pR->y + fs; tmprects->width = lw; ! tmprects->height = pR->height - lw; tmprects++; tmprects->x = pR->x - ss; --- 86,98 ---- tmprects->x = pR->x - ss; tmprects->y = pR->y + fs; tmprects->width = lw; ! tmprects->height = tmp; tmprects++; tmprects->x = pR->x + pR->width - ss; tmprects->y = pR->y + fs; tmprects->width = lw; ! tmprects->height = tmp; tmprects++; tmprects->x = pR->x - ss; --John Carr (jfc@athena.mit.edu)