Re: GtkButton as a no-window widget



At 19:34 05.11.01 -0500, Owen Taylor wrote:
>
>The following patch makes GtkButton a no-window widget, using an
>input-only window to catch events.
>
>Advantages:
>
> - Many less subwindows - less temporary pixmaps created for exposes,
>   less invalidation regions, etc.
>
- less problems with a resource limited OS (uhm windoze 9x)

- probably less flicker when invalidating occurs on the toplevel 
  window, because all the buttons are blitted at once (with there
  owning window) ?

> [...]
> 
> - Much code simplification in GtkToggleButton, since it doesn't
>   need 
>
Isn't there something needed ?
But even without what it doesn't need: a patch removing more source
as adding while improving functionality looks always appealing ...

> - Get rid of some of the awful "pretend that things are transparent
>   by using parent relative backgrounds" hacks.
>
>Disadvantages:
>
> - The optimization that I got working over the weekend no longer
>   helps for button widgets. Which was where it mainly helped.
>
Do I have missed any anouncements of them on the list ?

>Incompatibilities:
>
> - Widgets deriving from GtkButton need to modify their code to
>   take into account the fact that they are NO_WINDOW. I'm 
>   not sure there are many of these outside of GTK+, which
>   has GtkToggleButton and GtkOptionMenu.
>
Doesn't the change propagate to Widgets derived from these, too ?

> - People putting GtkButton widgets into custom widgets have to
>   take care to propagate exposes.
>
On which level does it break (while compiling, g_(warning|assert),
drawing failures or even crashing without note) ?
And shouldn't the patch include some change of Changes-2.0.txt.
Also it appears that some files are missing from the ChangeLog
entry: gtk/gtktogglebutton.c gtk/gtkoptionmenu.c gtk/gtkclist.c 
gtk/gtkcheckbutton.c
 
>I think it makes things look a lot better, and would allow for some
>really neat theming stuff... OTOH, people are probably going
>to get angry at me for rejecting small additions and putting this
>in...
>
Not yet had time to apply your patch but it sounds like it
falls in the group of required optimizations :-)

	Hans

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert



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