Index: src/events.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/events.c,v retrieving revision 1.22 diff -c -r1.22 events.c *** src/events.c 2001/02/15 21:46:36 1.22 --- src/events.c 2001/02/17 04:47:47 *************** *** 90,96 **** } update_window_names (s); ! } } void --- 90,102 ---- } update_window_names (s); ! #ifdef AUTO_CLOSE ! if (is_zero_windows()) ! { ! send_kill (); ! } ! #endif ! } } void Index: src/list.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/list.c,v retrieving revision 1.10 diff -c -r1.10 list.c *** src/list.c 2001/02/15 21:48:01 1.10 --- src/list.c 2001/02/17 04:47:48 *************** *** 102,108 **** return NULL; } ! void remove_from_window_list (rp_window *w) { --- 102,118 ---- return NULL; } ! #ifdef AUTO_CLOSE ! // BENNO: This is used by the code which does the auto_close. ! // It could just be left in, but in order to reduce bloat I'll ! // ifdef it aswell ! int ! is_zero_windows () ! { ! return (rp_window_head->next == (rp_window*) NULL && rp_window_head->prev == (rp_window*) NULL); ! } ! #endif ! void remove_from_window_list (rp_window *w) { Index: src/list.h =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/list.h,v retrieving revision 1.5 diff -c -r1.5 list.h *** src/list.h 2001/02/15 21:44:59 1.5 --- src/list.h 2001/02/17 04:47:48 *************** *** 35,39 **** int goto_window_name (char *name); rp_window *find_last_accessed_window (); rp_window *find_window_by_number (int n); ! #endif /* ! _RATPOISON_LIST_H */ --- 35,41 ---- int goto_window_name (char *name); rp_window *find_last_accessed_window (); rp_window *find_window_by_number (int n); ! #ifdef AUTO_CLOSE ! int is_zero_windows (); ! #endif #endif /* ! _RATPOISON_LIST_H */ Index: src/ratpoison.h =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/ratpoison.h,v retrieving revision 1.8 diff -c -r1.8 ratpoison.h *** src/ratpoison.h 2001/02/15 21:44:59 1.8 --- src/ratpoison.h 2001/02/17 04:47:48 *************** *** 60,64 **** void clean_up (); screen_info *find_screen (Window w); ! #endif /* ! _RATPOISON_H */ --- 60,69 ---- void clean_up (); screen_info *find_screen (Window w); ! #ifdef AUTO_CLOSE ! // BENNO: This is used in events.c to close the XServer. Seemed neat ! // to put it here. Rather than #including all of communications.h in events.c ! // probably needs to be changed. ! void send_kill (); ! #endif #endif /* ! _RATPOISON_H */