Mercurial > hg > xemacs-beta
comparison src/window.c @ 1979:6a91a3c8f1dc
[xemacs-hg @ 2004-04-03 20:49:25 by adrian]
[PATCH] dedicated window deletion patch <82ad1yyjvs.fsf@us.dmz.local>
author | adrian |
---|---|
date | Sat, 03 Apr 2004 20:49:26 +0000 |
parents | 84acc03a7080 |
children | 51a17f29fab3 |
comparison
equal
deleted
inserted
replaced
1978:f32f3ddaf534 | 1979:6a91a3c8f1dc |
---|---|
58 Lisp_Object Qface_cache, Qglyph_cache, Qline_start_cache, Qother_redisplay; | 58 Lisp_Object Qface_cache, Qglyph_cache, Qline_start_cache, Qother_redisplay; |
59 #ifdef HAVE_SCROLLBARS | 59 #ifdef HAVE_SCROLLBARS |
60 Lisp_Object Qscrollbar_instances; | 60 Lisp_Object Qscrollbar_instances; |
61 #endif | 61 #endif |
62 #endif | 62 #endif |
63 | |
64 extern int allow_deletion_of_last_visible_frame; | |
63 | 65 |
64 EXFUN (Fnext_window, 4); | 66 EXFUN (Fnext_window, 4); |
65 | 67 |
66 static int window_pixel_width_to_char_width (struct window *w, | 68 static int window_pixel_width_to_char_width (struct window *w, |
67 int pixel_width, | 69 int pixel_width, |
2917 | 2919 |
2918 /* If this window is dedicated, and in a frame | 2920 /* If this window is dedicated, and in a frame |
2919 of its own, kill the frame. */ | 2921 of its own, kill the frame. */ |
2920 if (EQ (w, FRAME_ROOT_WINDOW (f)) | 2922 if (EQ (w, FRAME_ROOT_WINDOW (f)) |
2921 && !NILP (p->dedicated) | 2923 && !NILP (p->dedicated) |
2922 && other_visible_frames (f)) | 2924 && (allow_deletion_of_last_visible_frame |
2925 || other_visible_frames (f))) | |
2923 { | 2926 { |
2924 /* Skip the other windows on this frame. | 2927 /* Skip the other windows on this frame. |
2925 There might be one, the minibuffer! */ | 2928 There might be one, the minibuffer! */ |
2926 if (! EQ (w, last_window)) | 2929 if (! EQ (w, last_window)) |
2927 while (f == XFRAME (WINDOW_FRAME | 2930 while (f == XFRAME (WINDOW_FRAME |
3369 if (NILP (another_buffer)) | 3372 if (NILP (another_buffer)) |
3370 another_buffer = Fget_buffer_create (QSscratch); | 3373 another_buffer = Fget_buffer_create (QSscratch); |
3371 if (!NILP (XWINDOW (window)->dedicated) | 3374 if (!NILP (XWINDOW (window)->dedicated) |
3372 && EQ (window, | 3375 && EQ (window, |
3373 FRAME_ROOT_WINDOW (XFRAME (frame))) | 3376 FRAME_ROOT_WINDOW (XFRAME (frame))) |
3374 && other_visible_frames (XFRAME (frame))) | 3377 && (allow_deletion_of_last_visible_frame |
3378 || other_visible_frames (XFRAME (frame)))) | |
3375 { | 3379 { |
3376 delete_frame_internal (XFRAME (frame), 0, 0, 0); /* GC */ | 3380 delete_frame_internal (XFRAME (frame), 0, 0, 0); /* GC */ |
3377 } | 3381 } |
3378 else | 3382 else |
3379 { | 3383 { |