Finally solved this stuff, the problem wasnt with glade, the problem was that i was using the "destroy" event in glade, i just changed the "destroy" to "delete-event" and it worked like a charm. thanx :)