Advertisement

how to catch "DestroyNotify" ?

Started by February 01, 2004 09:29 AM
2 comments, last by uNiQue0815 20 years, 7 months ago
i''d like to prevent my window from being closed. just like all the other programs which ask me "would you like to save before you quit ?". i''m using plain Xlib. my window''s event_mask contains StructureNotifyMask, so i should be able to receive DestroyNotify, right ? in all my tests, i never received one... and even if i did... what must i do to prevent the window from being closed ? i''ve googled for some hours now... nothing
no one ?

anyone knows a good only-unix/linux-programming-forum, then ?
Advertisement
I took some time to look up an answer when you first posted this but I didn''t come up with anything particularly helpful. As far as I can tell, DestroyNotify is only delivered when XDestroyWindow is called. So, I guess you have to somehow intercept some other event, not allow it to automatically destroy the window, and determine if you want to call XDestroyWindow or not. I don''t really know my way around Xlib enough to tell you how to do that though. Of course, I could just be wrong .

thanks anyway... today i had an idea, how i could maybedo it... but i''m not sure. maybe i''ll have time to test it tonight at home (still sitting at work, stuck on WinXP right now...)

i''ll post my "results", then... :D

This topic is closed to new replies.

Advertisement