Possible bug in Composite extension

Amir Bukhari ufz6 at rz.uni-karlsruhe.de
Wed Jan 5 03:56:12 PST 2005


take also in mind that redirected window is in Manual Update mode and
their parent are not redirect and also not the root window. we didn't
use Automatic Update in LG3D.

On Wed, 2005-01-05 at 12:48 +0100, Amir Bukhari wrote:
> In LG3D project we have notice that when we resize some application
> their content are not fully updated and we see garbage content instead.
> after debuging LG3D and Xorg I have found the following in Composite
> extension:
> 
> 1- when resize occure it create a new pixmap and copy bits pixel from
> parent window to new pixmap to have reasonable background.
> 2- after resize operation is done the old pixmap is destroyed.
> 
> normal application will receive Exposure event to update their content,
> but not all application repaint the complet window from scratch after
> each resize, they expect that some parts of the window are not affected
> by resizing and thus don't repaint this parts. this case has not been
> taken by composite extension.
> 
> I have made a modification to compReallocPixmap, so that it copy
> reasonable pixel from the old pixmap to new pixmap.
> 
> bellow you will find my modificaton. if you have any inputs please don't
> wait to give it us here ;-).
> 
> the big fix:
> 
> if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height)
>     {
> 	pNew = compNewPixmap (pWin, pix_x, pix_y, pix_w, pix_h);
> 	if (!pNew)
> 	    return FALSE;
> 	cw->pOldPixmap = pOld;
> 	compSetPixmap (pWin, pNew);
> #ifdef LG3D
> 	int height = pix_h < pOld->drawable.height ?
> pix_h:pOld->drawable.height;
> 	int width  = pix_w < pOld->drawable.width ? pix_w:pOld->drawable.width;
> 	GCPtr	    pGC = GetScratchGC (pWin->drawable.depth, pScreen);
> 	/*
> 	 * Copy bits from the old pixmap into the new pixmap so that it will
> 	 * have "reasonable" contents in case the application doesn't update
> the content
> 	 * after resize occure. this happend when the window is in the top
> stack and thus
> 	 * application doesn't need to repaint its complete content
> (background, menus etc).
> 	 * example applications is gnome-calculator & xterm.
> 	 */
> 	if (pGC)
> 	{
> 	    XID val = IncludeInferiors;
> 		
> 	    ValidateGC(&pNew->drawable, pGC);
> 	    dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
> 	    (*pGC->ops->CopyArea) (&pOld->drawable,
> 	       &pNew->drawable,
> 	       pGC,
> 	       0, 0,
> 	       width, height, 0, 0);
> 	    FreeScratchGC (pGC);
> 	}
> #endif
>     }
> 
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg




More information about the xorg mailing list