comparison src/keyboard.c @ 5224:5831f83a0afe

(kbd_buffer_get_event): For delete-window-event, do count iconified frames.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 00:39:25 +0000
parents 85a1088ca765
children 95a44cfa9e17
comparison
equal deleted inserted replaced
5223:db2e7e6a488e 5224:5831f83a0afe
1940 #endif 1940 #endif
1941 } 1941 }
1942 #ifdef HAVE_X11 1942 #ifdef HAVE_X11
1943 else if (event->kind == delete_window_event) 1943 else if (event->kind == delete_window_event)
1944 { 1944 {
1945 Lisp_Object value; 1945 Lisp_Object tail, frame;
1946 1946 struct frame *f;
1947 /* If the user destroys the only frame, Emacs should exit. */ 1947
1948 value = Fvisible_frame_list (); 1948 /* If the user destroys the only frame, Emacs should exit.
1949 if (! CONSP (value) || ! CONSP (XCONS (value)->cdr)) 1949 Count visible frames and iconified frames. */
1950 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
1951 {
1952 frame = XCONS (tail)->car;
1953 if (XTYPE (frame) != Lisp_Frame || EQ (frame, event->frame_or_window))
1954 continue;
1955 f = XFRAME (frame);
1956 if (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f))
1957 break;
1958 }
1959
1960 if (! CONSP (tail))
1950 kill (getpid (), SIGHUP); 1961 kill (getpid (), SIGHUP);
1951 1962
1952 Fdelete_frame (event->frame_or_window, Qt); 1963 Fdelete_frame (event->frame_or_window, Qt);
1953 kbd_fetch_ptr = event + 1; 1964 kbd_fetch_ptr = event + 1;
1954 } 1965 }