Re: transparent window



>I think I figure out what is wrong:
>
>For the drawing Pixmap, because the depth of the pixmap may not be 1, so that,
>if you use
>    gdk_draw_pixmap (tarea->mask, tarea->bitmap_gc, src, xsrc, ysrc, xdest, yd
>est,
>width, height);
>in the function
>   gtk_transparency_draw_pixmap(...).
>Because the bitmap_gc only supports depth 1, and the src, which is the pixmap 
>may
>have depth more than 1;
>if this happened, then it will cause problem.
>
>To fix this problem, only need to simply
>Change :
>    gdk_draw_pixmap (tarea->mask, tarea->bitmap_gc, src, xsrc, ysrc, xdest, yd
>est,
>width, height);
>in the gtk_transparency_draw_pixmap(...)
>To:
>    gdk_draw_rectangle( tarea->mask, tarea->bitmap_gc, true, xdest, ydest, wid
>th,
>height );
>
>I tryed this and it works perfect.

Sounds good. Except:

       tarea->mask

*is* a BITMAP (i.e. a pixmap with depth 1). so if you've found a
situation in which the mask does not have depth 1, you've found a
bug. how do you think you ended up with a depth != 1 ?

--p






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]