Re: Bug #50372 Setting stipple to NULL = X error



> ------- Additional Comments From Owen Taylor 2001-05-31 18:12 -------
>
>   This patch isn't clean for displays where the depth of the
>   root window doesn't match the depth of the GC. 
>
>   The slow way of doing this is to create a new pixmap of the
>   depth, create the GC for the pixmap, then destroy the
>   pixmap along with the GC. However, that might make this
>   slower than simply creating a pixmap to correspond to the
>   default tile or stipple when unsetting these fields.

"...Simply creating a pixmap..." suffers the same problem. How deep should the new pixmap be?  The
GC itself doesn't contain the depth, and you can't extract the depth from any existing tile pixmap
currently defined for the GC. (I think...)


In light of not being able to create a pixmap or a GC in this situation, I suggest the approach of
the original patch:
If the tile is being set to NULL, then ignore the request.

However, to achieve what Havoc specified (a long time ago) as the desired behaviour, the XGC
fill_style field could be switched to "FillSolid" if the gtk-gc values->fill is GDK_GC_TILE and
the values->Tile is None.
This needs to be done carefully; subsequent calls to set the fill style to GDK_GC_TILE need to be
intercepted, as well, until the point when a new non-NULL tile is specified.

Jamie S.

__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/




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