How do expose_events work?



Hi,

I've written my own container and it used to work perfect so far.
I can add buttons, labels,.. But today, I tried to add a gtk_drawing_area.

The problem is that this drawing area does _not_ get any expose_
events (although I used gtk_widget_set_events(m_hDrawingArea,
GDK_EXPOSURE_MASK)).

It does get configure_event's though.
I tried to connect to a expose_event of a gtk_button in my 
container and that works fine.

Does a gtk_drawing_area have an X-window? or is it a thin
component like a label?

I have a expose handler in my container that forwards events
to children without a window:

if (GTK_WIDGET_DRAWABLE(child) && GTK_WIDGET_NO_WINDOW(child) &&
    gtk_widget_intersect(child, &event->area, &child_event.area))
             gtk_widget_event(child, (GdkEvent*)&child_event);

So, if the drawing_area has an X-window, the problem can't be
with my container? can it?

Anybody sees what i'm missing?

Thanks,

        Jan Struyf

<portablegui.sourceforge.net>






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