gtk-list] Re: gtk+ 1.2.4 : a possible bug in gtk_widget_size_allocate()



Tim Janik wrote:
> 
> could you try to nail this down to a small testcase taht i can compile
> and run here? in any case what you are reporting here sounds somewhat

it takes me a while to extract the code from vdk, but i will do it

> strange, as modality doesn't affect a toplevels allocation. are you
> sure the widget is still valid after gtk_main()?

You are right, the warning isn't generated by the toplevel windows but
from an inner box. (i have modified gtk_widget_size_allocate() to warn
also widget name)
Roughly what happens is this:
- make the window
- add a box
- realize the window
- set it as modal
- show it
- call gtk_main()
- get the warning by the box when is gtk_widget_size_allocate() (2)

What i can't well understood is why gtkwidget_size_allocated is called
twice with this chain:
- call gtkwidget_size_allocate(box)
- a size_allocate signal is emitted and processed
- call again gtkwidget_size_allocate(box) and boom, warning got.

The widget is valid before gtk_main() and remains valid until 
gtk_main_quit(), after that get destroyed

I saw that gtkwidget_size_allocate() was modified since last 1.2.3,
anyway the warning is absolutely benign without side effects.

Soon i will post a short test case (directly to you or
you prefere on the list ?)

regards
/mario
-- 
Mario Motta, AI Research Group - Rimini
mmotta@guest.net; mmotta@programmers.net 
http://www.programmers.net/artic/Motta/vdk/index.htm



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