aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorJim Blandy1992-06-30 13:54:21 +0000
committerJim Blandy1992-06-30 13:54:21 +0000
commite5d77022e8429ca757746ed5d7cf9e2420703e8e (patch)
tree2e273d216c8f9e34d5e29547f8e7e7c6c5d32049 /src/window.c
parent53b0a6f88893036a42db2abcfbc257b68906956e (diff)
downloademacs-e5d77022e8429ca757746ed5d7cf9e2420703e8e.tar.gz
emacs-e5d77022e8429ca757746ed5d7cf9e2420703e8e.zip
*** empty log message ***
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c40
1 files changed, 17 insertions, 23 deletions
diff --git a/src/window.c b/src/window.c
index ddb2661c71b..b1876a219bb 100644
--- a/src/window.c
+++ b/src/window.c
@@ -47,14 +47,6 @@ static struct window *decode_window();
47 47
48Lisp_Object selected_window; 48Lisp_Object selected_window;
49 49
50#ifndef MULTI_SCREEN
51
52/* The root window for the screen.
53 This is accessed via SCREEN_ROOT_WINDOW (selected_screen). */
54Lisp_Object root_window;
55
56#endif
57
58/* The minibuffer window of the selected screen. 50/* The minibuffer window of the selected screen.
59 Note that you cannot test for minibufferness of an arbitrary window 51 Note that you cannot test for minibufferness of an arbitrary window
60 by comparing against this; but you can test for minibufferness of 52 by comparing against this; but you can test for minibufferness of
@@ -222,7 +214,7 @@ POS defaults to point; WINDOW, to the selected window.")
222 posval = *compute_motion (top, 0, 0, posint, height, 0, 214 posval = *compute_motion (top, 0, 0, posint, height, 0,
223 XFASTINT (w->width) - 1 215 XFASTINT (w->width) - 1
224 - (XFASTINT (w->width) + XFASTINT (w->left) 216 - (XFASTINT (w->width) + XFASTINT (w->left)
225 != XSCREEN (w->screen)->width), 217 != SCREEN_WIDTH (XSCREEN (w->screen))),
226 XINT (w->hscroll), 0); 218 XINT (w->hscroll), 0);
227 219
228 return posval.vpos < height ? Qt : Qnil; 220 return posval.vpos < height ? Qt : Qnil;
@@ -363,9 +355,9 @@ measured in characters from the upper-left corner of the screen.\n\
363screen.\n\ 355screen.\n\
364If COORDINATES are in the text portion of WINDOW,\n\ 356If COORDINATES are in the text portion of WINDOW,\n\
365 the coordinates relative to the window are returned.\n\ 357 the coordinates relative to the window are returned.\n\
366If they are in the mode line of WINDOW, 'mode-line is returned.\n\ 358If they are in the mode line of WINDOW, `mode-line' is returned.\n\
367If they are on the border between WINDOW and its right sibling,\n\ 359If they are on the border between WINDOW and its right sibling,\n\
368 'vertical-split is returned.") 360 `vertical-line' is returned.")
369 (coordinates, window) 361 (coordinates, window)
370 register Lisp_Object coordinates, window; 362 register Lisp_Object coordinates, window;
371{ 363{
@@ -388,7 +380,7 @@ If they are on the border between WINDOW and its right sibling,\n\
388 return Qmode_line; 380 return Qmode_line;
389 381
390 case 3: /* On right border of window. */ 382 case 3: /* On right border of window. */
391 return Qvertical_split; 383 return Qvertical_line;
392 384
393 default: 385 default:
394 abort (); 386 abort ();
@@ -642,8 +634,8 @@ replace_window (old, replacement)
642 /* If OLD is its screen's root_window, then replacement is the new 634 /* If OLD is its screen's root_window, then replacement is the new
643 root_window for that screen. */ 635 root_window for that screen. */
644 636
645 if (old == XSCREEN (o->screen)->root_window) 637 if (old == SCREEN_ROOT_WINDOW (XSCREEN (o->screen)))
646 XSCREEN (o->screen)->root_window = replacement; 638 SCREEN_ROOT_WINDOW (XSCREEN (o->screen)) = replacement;
647 639
648 p->left = o->left; 640 p->left = o->left;
649 p->top = o->top; 641 p->top = o->top;
@@ -1062,7 +1054,8 @@ window_loop (type, obj, mini, screens)
1062 1054
1063 case GET_LRU_WINDOW: 1055 case GET_LRU_WINDOW:
1064 /* t as arg means consider only full-width windows */ 1056 /* t as arg means consider only full-width windows */
1065 if (!NILP (obj) && XFASTINT (XWINDOW (w)->width) != screen->width) 1057 if (!NILP (obj) && XFASTINT (XWINDOW (w)->width)
1058 != SCREEN_WIDTH (screen))
1066 break; 1059 break;
1067#if 0 1060#if 0
1068 /* Ignore invisible and iconified screens. */ 1061 /* Ignore invisible and iconified screens. */
@@ -2614,32 +2607,33 @@ init_window_once ()
2614#else /* not MULTI_SCREEN */ 2607#else /* not MULTI_SCREEN */
2615 extern Lisp_Object get_minibuffer (); 2608 extern Lisp_Object get_minibuffer ();
2616 2609
2617 root_window = make_window (); 2610 SCREEN_ROOT_WINDOW (selected_screen) = make_window ();
2618 minibuf_window = make_window (); 2611 minibuf_window = make_window ();
2619 2612
2620 XWINDOW (root_window)->next = minibuf_window; 2613 XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->next = minibuf_window;
2621 XWINDOW (minibuf_window)->prev = root_window; 2614 XWINDOW (minibuf_window)->prev = SCREEN_ROOT_WINDOW (selected_screen);
2622 2615
2623 /* These values 9 and 10 are arbitrary, 2616 /* These values 9 and 10 are arbitrary,
2624 just so that there is "something there." 2617 just so that there is "something there."
2625 Correct values are put in in init_xdisp */ 2618 Correct values are put in in init_xdisp */
2626 2619
2627 XFASTINT (XWINDOW (root_window)->width) = 10; 2620 XFASTINT (XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->width) = 10;
2628 XFASTINT (XWINDOW (minibuf_window)->width) = 10; 2621 XFASTINT (XWINDOW (minibuf_window)->width) = 10;
2629 2622
2630 XFASTINT (XWINDOW (root_window)->height) = 9; 2623 XFASTINT (XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->height) = 9;
2631 XFASTINT (XWINDOW (minibuf_window)->top) = 9; 2624 XFASTINT (XWINDOW (minibuf_window)->top) = 9;
2632 XFASTINT (XWINDOW (minibuf_window)->height) = 1; 2625 XFASTINT (XWINDOW (minibuf_window)->height) = 1;
2633 2626
2634 /* Prevent error in Fset_window_buffer. */ 2627 /* Prevent error in Fset_window_buffer. */
2635 XWINDOW (root_window)->buffer = Qt; 2628 XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->buffer = Qt;
2636 XWINDOW (minibuf_window)->buffer = Qt; 2629 XWINDOW (minibuf_window)->buffer = Qt;
2637 2630
2638 /* Now set them up for real. */ 2631 /* Now set them up for real. */
2639 Fset_window_buffer (root_window, Fcurrent_buffer ()); 2632 Fset_window_buffer (SCREEN_ROOT_WINDOW (selected_screen),
2633 Fcurrent_buffer ());
2640 Fset_window_buffer (minibuf_window, get_minibuffer (0)); 2634 Fset_window_buffer (minibuf_window, get_minibuffer (0));
2641 2635
2642 selected_window = root_window; 2636 selected_window = SCREEN_ROOT_WINDOW (selected_screen);
2643 /* Make sure this window seems more recently used than 2637 /* Make sure this window seems more recently used than
2644 a newly-created, never-selected window. Increment 2638 a newly-created, never-selected window. Increment
2645 window_select_count so the first selection ever will get 2639 window_select_count so the first selection ever will get