rem: XSetClipMask(scr->display, scr->clipGC, panel->magnifyGlass->mask); XSetClipOrigin(scr->display, scr->clipGC, 0, 0);  XCopyArea(scr->display, magPix, backPix, scr->clipGC, 2, 2, Cursor_mask_width, Cursor_mask_height, 0, 0);
add: XCopyArea(scr->display, panel->magnifyGlass->magPix, pixmap, scr->clipGC, 1, 1, Cursor_mask_width, Cursor_mask_height, 0, 0);
context: magnifyCreatePixmap(WMColorPanel *panel){    W_Screen *scr = WMWidgetScreen(panel->win);    int		u, v;    int		i, j;    int		ofs;    Pixmap	magPix;    Pixmap	backPix;    RImage	*pixelImg;    const int half_mask_width = Cursor_mask_width/2;    const int half_mask_height = Cursor_mask_height/2;            /*     *  Get image     */        /* Rectangle that's going to be the background */    backPix = XCreatePixmap(scr->display, W_DRAWABLE(scr), Cursor_mask_width,			    Cursor_mask_height , scr->depth);    XCopyArea(scr->display, panel->magnifyGlass->pixmap, backPix, scr->copyGC,	      0, 0, Cursor_mask_width, Cursor_mask_height, 0, 0);        /*     * Magnify image     */        magPix = XCreatePixmap(scr->display, W_DRAWABLE(scr), Cursor_mask_width +2,			   Cursor_mask_height +2, scr->depth);        for (u=0; u<5+1; u++)	/* Copy an area of 5x5 pixels from the center */	for (v=0; v<5+1; v++)	    for (i=u*5; i < (u+1)*5; i++)	/* magnify it 5 times */		for (j=v*5; j < (v+1)*5; j++)		    XCopyArea(scr->display, backPix, magPix, scr->copyGC, 			      u +9, v +9, 1, 1, i, j);        /* Get color under hotspot */    ofs = half_mask_width + half_mask_height * Cursor_mask_width;    pixelImg = RCreateImageFromDrawable(scr->rcontext, backPix, backPix);    panel->magnifyGlass->color.red   = pixelImg->data[0][ofs];    panel->magnifyGlass->color.green = pixelImg->data[1][ofs];    panel->magnifyGlass->color.blue  = pixelImg->data[2][ofs];    RDestroyImage(pixelImg);        /* Copy the magnified pixmap, with the clip mask, to background pixmap */    XSetClipMask(scr->display, scr->clipGC, panel->magnifyGlass->mask);    XSetClipOrigin(scr->display, scr->clipGC, 0, 0);        XCopyArea(scr->display, magPix, backPix, scr->clipGC, 2, 2, 	      Cursor_mask_width, Cursor_mask_height, 0, 0);	    /* (2,2) puts center pixel on center of glass */        XFreePixmap(scr->display, magPix);        return backPix;}