aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/frame.c b/src/frame.c
index 5ee421bb9bf..692d224866c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -224,7 +224,7 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
224 FRAME_WINDOW_SIZES_CHANGED (f) = 1; 224 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
225 FRAME_MENU_BAR_LINES (f) = nlines; 225 FRAME_MENU_BAR_LINES (f) = nlines;
226 set_menu_bar_lines_1 (f->root_window, nlines - olines); 226 set_menu_bar_lines_1 (f->root_window, nlines - olines);
227 adjust_glyphs (f); 227 adjust_frame_glyphs (f);
228 } 228 }
229} 229}
230 230
@@ -712,7 +712,7 @@ affects all frames on the same terminal device. */)
712 change_frame_size (f, height, width, 0, 0, 0); 712 change_frame_size (f, height, width, 0, 0, 0);
713 } 713 }
714 714
715 adjust_glyphs (f); 715 adjust_frame_glyphs (f);
716 calculate_costs (f); 716 calculate_costs (f);
717 XSETFRAME (frame, f); 717 XSETFRAME (frame, f);
718 718
@@ -1078,6 +1078,19 @@ Otherwise, include all frames. */)
1078 CHECK_LIVE_FRAME (frame); 1078 CHECK_LIVE_FRAME (frame);
1079 return prev_frame (frame, miniframe); 1079 return prev_frame (frame, miniframe);
1080} 1080}
1081
1082DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
1083 Slast_nonminibuf_frame, 0, 0, 0,
1084 doc: /* Return last non-minibuffer frame selected. */)
1085 (void)
1086{
1087 Lisp_Object frame = Qnil;
1088
1089 if (last_nonminibuf_frame)
1090 XSETFRAME (frame, last_nonminibuf_frame);
1091
1092 return frame;
1093}
1081 1094
1082/* Return 1 if it is ok to delete frame F; 1095/* Return 1 if it is ok to delete frame F;
1083 0 if all frames aside from F are invisible. 1096 0 if all frames aside from F are invisible.
@@ -1095,7 +1108,7 @@ other_visible_frames (struct frame *f)
1095 1108
1096 /* Verify that we can still talk to the frame's X window, 1109 /* Verify that we can still talk to the frame's X window,
1097 and note any recent change in visibility. */ 1110 and note any recent change in visibility. */
1098#ifdef HAVE_WINDOW_SYSTEM 1111#ifdef HAVE_X_WINDOWS
1099 if (FRAME_WINDOW_P (XFRAME (this))) 1112 if (FRAME_WINDOW_P (XFRAME (this)))
1100 x_sync (XFRAME (this)); 1113 x_sync (XFRAME (this));
1101#endif 1114#endif
@@ -1120,6 +1133,8 @@ check_minibuf_window (Lisp_Object frame, int select)
1120{ 1133{
1121 struct frame *f = decode_live_frame (frame); 1134 struct frame *f = decode_live_frame (frame);
1122 1135
1136 XSETFRAME (frame, f);
1137
1123 if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window)) 1138 if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window))
1124 { 1139 {
1125 Lisp_Object frames, this, window = make_number (0); 1140 Lisp_Object frames, this, window = make_number (0);
@@ -1137,9 +1152,8 @@ check_minibuf_window (Lisp_Object frame, int select)
1137 } 1152 }
1138 } 1153 }
1139 1154
1140 if (!WINDOWP (window)) 1155 /* Don't abort if no window was found (Bug#15247). */
1141 emacs_abort (); 1156 if (WINDOWP (window))
1142 else
1143 { 1157 {
1144 /* Use set_window_buffer instead of Fset_window_buffer (see 1158 /* Use set_window_buffer instead of Fset_window_buffer (see
1145 discussion of bug#11984, bug#12025, bug#12026). */ 1159 discussion of bug#11984, bug#12025, bug#12026). */
@@ -4493,6 +4507,7 @@ automatically. See also `mouse-autoselect-window'. */);
4493 defsubr (&Sframe_list); 4507 defsubr (&Sframe_list);
4494 defsubr (&Snext_frame); 4508 defsubr (&Snext_frame);
4495 defsubr (&Sprevious_frame); 4509 defsubr (&Sprevious_frame);
4510 defsubr (&Slast_nonminibuf_frame);
4496 defsubr (&Sdelete_frame); 4511 defsubr (&Sdelete_frame);
4497 defsubr (&Smouse_position); 4512 defsubr (&Smouse_position);
4498 defsubr (&Smouse_pixel_position); 4513 defsubr (&Smouse_pixel_position);