Muncher & deleting Gtk-- windows

Putting in the idle handler which returns false, and which runs
immediately the next time the Gtk main loop is idle, pointed out that I'm
still having some trouble deleting Gtk-- windows.

If all that I have the "delete" callback (or the callback for whatever
"quit" button) for the window do is add the window's object to the Muncher
list, and all that Muncher does is delete the objects on its list, then
the window never actually closes... it stays there, which produces all
sorts of errors like :

** WARNING **: file line 265 (static int Gtk_Widget::leave_notify_event_callback(struct _GtkWidget *, struct_GdkEventCrossing *)): "obj"

** WARNING **: file line 166 (static int Gtk_Widget::event_callback(struct _GtkWidget *, union _GdkEvent *)): "obj"

when I move the mouse in and out of it.

The other option is have the delete event for the window object call
hide() before it adds itself to the Muncher list.  In that case, the
window does go away, but there seem to be some residual events left over
which the main loop deals with _after_ it deals with the idle Muncher
task, because after the Muncher has munched the window, there are a
handful of ** WARNING ** errors.

Is there some way to "flush" all the events waiting for a given window and
all its children?  Is there something besides just hide() I should call
for the window before I tell the Muncher to delete it at next idle?

(I think I didn't see this when I was using the "timeout" thing because
the timeout was just luckily letting the Gtk main loop deal with the
residual events before it called the timeout task.)

(The events waiting seem to be an unmap event, some leave notify events,



==== Rob Knop ===== ====== ======

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