Commit 91fb7e1b authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(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.
parent 1cc04aed
...@@ -235,9 +235,9 @@ Lisp_Object Qdisplay_table; ...@@ -235,9 +235,9 @@ Lisp_Object Qdisplay_table;
/* The currently selected frame. In a single-frame version, this /* The currently selected frame. In a single-frame version, this
variable always holds the address of the_only_frame. */ variable always equals the_only_frame. */
struct frame *selected_frame; Lisp_Object selected_frame;
/* A frame which is not just a mini-buffer, or 0 if there are no such /* A frame which is not just a mini-buffer, or 0 if there are no such
frames. This is usually the most recent such frame that was frames. This is usually the most recent such frame that was
...@@ -1902,24 +1902,24 @@ adjust_glyphs (f) ...@@ -1902,24 +1902,24 @@ adjust_glyphs (f)
static void static void
adjust_frame_glyphs_initially () adjust_frame_glyphs_initially ()
{ {
struct window *root = XWINDOW (selected_frame->root_window); struct frame *sf = SELECTED_FRAME ();
struct window *root = XWINDOW (sf->root_window);
struct window *mini = XWINDOW (root->next); struct window *mini = XWINDOW (root->next);
int frame_height = FRAME_HEIGHT (selected_frame); int frame_height = FRAME_HEIGHT (sf);
int frame_width = FRAME_WIDTH (selected_frame); int frame_width = FRAME_WIDTH (sf);
int top_margin = FRAME_TOP_MARGIN (selected_frame); int top_margin = FRAME_TOP_MARGIN (sf);
/* Do it for the root window. */ /* Do it for the root window. */
XSETFASTINT (root->top, top_margin); XSETFASTINT (root->top, top_margin);
XSETFASTINT (root->width, frame_width); XSETFASTINT (root->width, frame_width);
set_window_height (selected_frame->root_window, set_window_height (sf->root_window, frame_height - 1 - top_margin, 0);
frame_height - 1 - top_margin, 0);
/* Do it for the mini-buffer window. */ /* Do it for the mini-buffer window. */
XSETFASTINT (mini->top, frame_height - 1); XSETFASTINT (mini->top, frame_height - 1);
XSETFASTINT (mini->width, frame_width); XSETFASTINT (mini->width, frame_width);
set_window_height (root->next, 1, 0); set_window_height (root->next, 1, 0);
adjust_frame_glyphs (selected_frame); adjust_frame_glyphs (sf);
glyphs_initialized_initially_p = 1; glyphs_initialized_initially_p = 1;
} }
...@@ -2992,7 +2992,7 @@ int ...@@ -2992,7 +2992,7 @@ int
direct_output_for_insert (g) direct_output_for_insert (g)
int g; int g;
{ {
register struct frame *f = selected_frame; register struct frame *f = SELECTED_FRAME ();
struct window *w = XWINDOW (selected_window); struct window *w = XWINDOW (selected_window);
struct it it, it2; struct it it, it2;
struct glyph_row *glyph_row; struct glyph_row *glyph_row;
...@@ -3253,7 +3253,7 @@ int ...@@ -3253,7 +3253,7 @@ int
direct_output_forward_char (n) direct_output_forward_char (n)
int n; int n;
{ {
struct frame *f = selected_frame; struct frame *f = SELECTED_FRAME ();
struct window *w = XWINDOW (selected_window); struct window *w = XWINDOW (selected_window);
struct glyph_row *row; struct glyph_row *row;
...@@ -5852,8 +5852,9 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\ ...@@ -5852,8 +5852,9 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
term_init (terminal_type); term_init (terminal_type);
{ {
int width = FRAME_WINDOW_WIDTH (selected_frame); struct frame *sf = SELECTED_FRAME ();
int height = FRAME_HEIGHT (selected_frame); int width = FRAME_WINDOW_WIDTH (sf);
int height = FRAME_HEIGHT (sf);
unsigned int total_glyphs = height * (width + 2) * sizeof (struct glyph); unsigned int total_glyphs = height * (width + 2) * sizeof (struct glyph);
...@@ -5864,7 +5865,7 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\ ...@@ -5864,7 +5865,7 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
} }
adjust_frame_glyphs_initially (); adjust_frame_glyphs_initially ();
calculate_costs (selected_frame); calculate_costs (XFRAME (selected_frame));
#ifdef SIGWINCH #ifdef SIGWINCH
#ifndef CANNOT_DUMP #ifndef CANNOT_DUMP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment