Re: [gtk-list] Re: obgtk + delete_event again

Shevek wrote:

> Something like, the delete event is one of two signals added. Now this
> didn't use to be the case on 0.99 but it is the case in 1.0. I run olvwm
> where when you kill a window it sends a delete event and I had to set up
> delete to call back destroy manually. Now it happens automatically. So
> when you set a signal on the delete event, there is still at least one
> signal int he queue, the deestroy. Now if you remove the window or trash
> the pointer to it on the delete event, then when the destroy signal gets
> around to it's turn, it's going to dereference a bad pointer and trash the
> stack. At least, I think that may be what the problem is. Leave
> delete_event alone, unless you need to use it as a
> gtk_signal_connect_before on a window or other object, IMHO. Unless anyone
> else knows other?
> I had this problem for ages.

Ok, I didn't think this was the case, but I commented out the event connection
to "destroy" just to be sure, were I got the exact same curse when I tried to
kill the window.
Also, I am pretty sure that if you return TRUE, as I did, then the window does
not get destroyed by a delete_event.  This is so you can call up a "save?"
window or something before you kill the program.  Or so the tutorial says.

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