Re: Bug 50372: Setting stipple to NULL = X error
- From: Havoc Pennington <hp redhat com>
- To: Jamie Strachan <frostfreek yahoo com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Bug 50372: Setting stipple to NULL = X error
- Date: 16 Mar 2001 17:18:46 -0500
Jamie Strachan <frostfreek yahoo com> writes:
> I have posted a patch under bug 50372, that simply
> ignores NULL stipples when setting the XGC.
> (Also did the same for tiles.)
>
> This means the XGC will have the previous stipple
> defined until such time as another non-NULL stipple is
> specified, or the XGC is destroyed.
>
> While this is probably the easiest way to solve the
> problem of eliminating the X Error, it occurs to me
> that this may not be what is desired.
>
> The API document does not specify what happens when
> you specify the fill style as GDK_[OPAQUE_]STIPPLED,
> and specify a stipple of NULL.
> I would probably file that under "UNDEFINED
> BEHAVIOUR", which can very well mean this patch is
> sufficient.
>
If NULL is not allowed, it should g_return_if_fail (GDK_IS_BITMAP
(stipple)).
If NULL is allowed, it should mean "unset the stipple," that is, I
think you set it to None with the Xlib API.
I think the latter behavior is better.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]