Re: Fixed as a NO_WINDOW
- From: James Henstridge <james daa com au>
- To: Tim Janik <timj gtk org>
- Cc: Owen Taylor <otaylor redhat com>, Gtk+ Developers <gtk-devel-list gnome org>, gnome-2-0-list gnome org
- Subject: Re: Fixed as a NO_WINDOW
- Date: Tue, 20 Nov 2001 09:32:04 +0800
Tim Janik wrote:
Hasn't use of GTK_WIDGET_SET_FLAGS() always been something that toolkit
users needed? The big one was setting the CAN_DEFAULT flag on buttons
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.
* 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
] [Thread Prev