aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-13 11:13:24 +0000
committerGerd Moellmann1999-09-13 11:13:24 +0000
commit91fb7e1b4a1cc814c9db7483d8fd26b03b99bcaa (patch)
tree2402e69ee78247c323a109e1af5396f7bd9527bd /src
parent1cc04aed1ef110e7f8b51034ee526adac49cd7de (diff)
downloademacs-91fb7e1b4a1cc814c9db7483d8fd26b03b99bcaa.tar.gz
emacs-91fb7e1b4a1cc814c9db7483d8fd26b03b99bcaa.zip
(selected_frame): Make it a Lisp_Object.
(adjust_frame_glyphs_initially): Change for Lisp_Object selected_frame. (direct_output_for_insert, direct_output_forward_char, init_display): Ditto.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index ee3fbc3e335..599019152c0 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -235,9 +235,9 @@ Lisp_Object Qdisplay_table;
235 235
236 236
237/* The currently selected frame. In a single-frame version, this 237/* The currently selected frame. In a single-frame version, this
238 variable always holds the address of the_only_frame. */ 238 variable always equals the_only_frame. */
239 239
240struct frame *selected_frame; 240Lisp_Object selected_frame;
241 241
242/* A frame which is not just a mini-buffer, or 0 if there are no such 242/* A frame which is not just a mini-buffer, or 0 if there are no such
243 frames. This is usually the most recent such frame that was 243 frames. This is usually the most recent such frame that was
@@ -1902,24 +1902,24 @@ adjust_glyphs (f)
1902static void 1902static void
1903adjust_frame_glyphs_initially () 1903adjust_frame_glyphs_initially ()
1904{ 1904{
1905 struct window *root = XWINDOW (selected_frame->root_window); 1905 struct frame *sf = SELECTED_FRAME ();
1906 struct window *root = XWINDOW (sf->root_window);
1906 struct window *mini = XWINDOW (root->next); 1907 struct window *mini = XWINDOW (root->next);
1907 int frame_height = FRAME_HEIGHT (selected_frame); 1908 int frame_height = FRAME_HEIGHT (sf);
1908 int frame_width = FRAME_WIDTH (selected_frame); 1909 int frame_width = FRAME_WIDTH (sf);
1909 int top_margin = FRAME_TOP_MARGIN (selected_frame); 1910 int top_margin = FRAME_TOP_MARGIN (sf);
1910 1911
1911 /* Do it for the root window. */ 1912 /* Do it for the root window. */
1912 XSETFASTINT (root->top, top_margin); 1913 XSETFASTINT (root->top, top_margin);
1913 XSETFASTINT (root->width, frame_width); 1914 XSETFASTINT (root->width, frame_width);
1914 set_window_height (selected_frame->root_window, 1915 set_window_height (sf->root_window, frame_height - 1 - top_margin, 0);
1915 frame_height - 1 - top_margin, 0);
1916 1916
1917 /* Do it for the mini-buffer window. */ 1917 /* Do it for the mini-buffer window. */
1918 XSETFASTINT (mini->top, frame_height - 1); 1918 XSETFASTINT (mini->top, frame_height - 1);
1919 XSETFASTINT (mini->width, frame_width); 1919 XSETFASTINT (mini->width, frame_width);
1920 set_window_height (root->next, 1, 0); 1920 set_window_height (root->next, 1, 0);
1921 1921
1922 adjust_frame_glyphs (selected_frame); 1922 adjust_frame_glyphs (sf);
1923 glyphs_initialized_initially_p = 1; 1923 glyphs_initialized_initially_p = 1;
1924} 1924}
1925 1925
@@ -2992,7 +2992,7 @@ int
2992direct_output_for_insert (g) 2992direct_output_for_insert (g)
2993 int g; 2993 int g;
2994{ 2994{
2995 register struct frame *f = selected_frame; 2995 register struct frame *f = SELECTED_FRAME ();
2996 struct window *w = XWINDOW (selected_window); 2996 struct window *w = XWINDOW (selected_window);
2997 struct it it, it2; 2997 struct it it, it2;
2998 struct glyph_row *glyph_row; 2998 struct glyph_row *glyph_row;
@@ -3253,7 +3253,7 @@ int
3253direct_output_forward_char (n) 3253direct_output_forward_char (n)
3254 int n; 3254 int n;
3255{ 3255{
3256 struct frame *f = selected_frame; 3256 struct frame *f = SELECTED_FRAME ();
3257 struct window *w = XWINDOW (selected_window); 3257 struct window *w = XWINDOW (selected_window);
3258 struct glyph_row *row; 3258 struct glyph_row *row;
3259 3259
@@ -5852,8 +5852,9 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
5852 term_init (terminal_type); 5852 term_init (terminal_type);
5853 5853
5854 { 5854 {
5855 int width = FRAME_WINDOW_WIDTH (selected_frame); 5855 struct frame *sf = SELECTED_FRAME ();
5856 int height = FRAME_HEIGHT (selected_frame); 5856 int width = FRAME_WINDOW_WIDTH (sf);
5857 int height = FRAME_HEIGHT (sf);
5857 5858
5858 unsigned int total_glyphs = height * (width + 2) * sizeof (struct glyph); 5859 unsigned int total_glyphs = height * (width + 2) * sizeof (struct glyph);
5859 5860
@@ -5864,7 +5865,7 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
5864 } 5865 }
5865 5866
5866 adjust_frame_glyphs_initially (); 5867 adjust_frame_glyphs_initially ();
5867 calculate_costs (selected_frame); 5868 calculate_costs (XFRAME (selected_frame));
5868 5869
5869#ifdef SIGWINCH 5870#ifdef SIGWINCH
5870#ifndef CANNOT_DUMP 5871#ifndef CANNOT_DUMP