diff options
author | "John Hawthorn ext:(%22) <jhawthor@uvic.ca> | 2008-12-31 18:49:54 -0800 |
---|---|---|
committer | "John Hawthorn ext:(%22) <jhawthor@uvic.ca> | 2008-12-31 18:49:54 -0800 |
commit | 7b5eb765586d442f1fd77bbd6ae98e8276d28b20 (patch) | |
tree | b6f6a88f6af2bb2ed36dae6db90bd59acbd796a8 | |
parent | d18da616dc9a06dca907e74f9f316c6ea3dbb55c (diff) | |
download | mirror-meh-7b5eb765586d442f1fd77bbd6ae98e8276d28b20.tar.gz mirror-meh-7b5eb765586d442f1fd77bbd6ae98e8276d28b20.tar.bz2 mirror-meh-7b5eb765586d442f1fd77bbd6ae98e8276d28b20.zip |
make I/O errors silent
-rw-r--r-- | src/xlib.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -142,6 +142,12 @@ void setaspect(unsigned int w, unsigned int h){ XFree(hints); } +/* Alt-F4 silent. Keeps people happy */ +int xquit(Display *d){ + exit(EXIT_SUCCESS); + return 0; +} + void xinit(){ display = XOpenDisplay (NULL); assert(display); @@ -154,6 +160,8 @@ void xinit(){ XMapRaised(display, window); XSelectInput(display, window, StructureNotifyMask | ExposureMask | KeyPressMask); XFlush(display); + XSetIOErrorHandler(xquit); + XFlush(display); } |