gtk+2 drawing on top of widgets



I have a window with some widgets inside and I would like to draw on top
of these widgets.

So I tried to connect to the expose-event on the window to draw there but
it does not work very well. To draw over the other widgets is easy by
setting GDK_INCLUDE_INFERIORS on the GC, but i'm having problems with the
clip regions.

So I tried to turn of double buffer for the window and tried to
get the old bahviour by calling first

 gdk_window_begin_paint_region (event->window, event->region);

and last

 gdk_window_end_paint (event->window);

My hope was to change the region to include also the part where I want to
paint. But it seems that I do not get the same result when I turn of
double buffer and do the above calls as when double buffer are turned on.

Can someone explain why my expose callback with the above calles are not
the same as the original double buffer one?

If someone have some other suggestion on how to paint over the widgets can
work please tell me. Can I know that the expose of the window is "the
last" thing that is done so that drawing will go on top of the children
inside the window?

-- 
/Dennis




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