Draw event



Hello all!

I write my own container that contains GtkButtons widgets. I
implements add, remove, size_request and size_allocate functions. When
some buttons are removed and some over added at same time (in one
function) I can see blink. Draw event emits two times: before and after
size_request function. Why this happen? At the end of function I call
gtk_widget_queue_resize - and this do nothing! 

But i read that GTK+ uses G_PRIORITY_HIGH_IDLE + 10 for resizing
operations, and G_PRIORITY_HIGH_IDLE + 20 for redrawing operations.
(This is done to ensure that any pending resizes are processed before
any pending redraws, so that widgets are not redrawn twice
unnecessarily.)

When I move update buttons code to idle with G_PRIORITY_HIGH_IDLE
priority - all works fine. 
I don't understand:(

Thanks!

Sorry for my bad English
-- 
Dubravin Andrey



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