diff options
Diffstat (limited to 'src')
-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); } |