[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page

Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 187) Can I rely on a server which offers backing store?
Next Document: 189) How do I keep a window from being resized by the user?


188) How do I catch the "close window" event to avoid "fatal IO error"?



	Several windows managers offer a function such as f.kill or f.delete
which sends a message to the application that it should delete its window;
this is usually interpreted as a shutdown message.
	The application needs to catch the WM_DELETE_WINDOW client message.
There is a good example in the xcalc sources in X11R5.
	Motif-based applications should in addition set the resource
XmNdeleteResponse on the top-level shell to XmDO_NOTHING, whether they are
using the Motif window manager or not.
	If the application doesn't handle this message the window manager may
wind up calling XKillClient, which disconnects the client from the display and
typically gives an Xlib error along the lines of "fatal IO error 32 (Broken 
pipe)".

[Thanks to Kaleb Keithley, kaleb@x.org; 11/93]



Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 187) Can I rely on a server which offers backing store?
Next Document: 189) How do I keep a window from being resized by the user?

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
faq%craft@uunet.uu.net (X FAQ maintenance address)

Last Update December 02 2008 @ 00:13 AM

© 2008 FAQS.ORG. All rights reserved.