Re: Fixed as a NO_WINDOW



On 18 Nov 2001, Owen Taylor wrote:

> 
> Those were all the API changes. Really, no kidding. Well, almost.
> 
> GtkFixed _really_ needs to be a NO_WINDOW widget; this 
> has been bugging me since 1.0.
> 
>  * For correct theming
>  * For consistency with all other containers that don't draw anything.
>  * For reduced overhead.
> 
> Effects:
> 
>  * I couldn't find any code in GNOME cvs that this will break
> 
>  * If there is something that breaks, insert:
> 
> +    GTK_WIDGET_UNSET_FLAGS (fixed, GTK_WIDGET_NO_WINDOW)
>    
>    after creating the fixed.
> 
>    (I added the hack of making this work, because I'm pretty sure 
>    people frequently use GtkFixed as an equivalent of a widget in some
>    other toolkit with fixed placement, and I don't want
>    such people to have write a new widget.)

arg! the GtkFixed NO_WINDOW part is fine, but people shall _never_ use
GTK_WIDGET_[UN]SET_FLAGS() in third-party code. 
checking for GTK_WIDGET_NO_WINDOW in gtkfixed.c to create a window
on demand is somewhat questionable, it might be usable for derived widgets,
but it's ugly as hell.

however, i'll not accept an API change (whether last minute or not) that makes
GTK_WIDGET_UNSET_FLAGS/GTK_WIDGET_SET_FLAGS public API for toolkit users,
regardless of the flag being passed.

besides, there's really no need to do that, people can simply put GtkFixed into
an eventbox.

> 
> Regards,
>                                         Owen
> 

---
ciaoTJ




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