comparison src/window.c @ 732:a8d94735277e

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Tue, 30 Jun 1992 13:54:21 +0000
parents 0a2391511b46
children ea0823fe7df5
comparison
equal deleted inserted replaced
731:5c6db33a9ef6 732:a8d94735277e
44 44
45 This value is always the same as 45 This value is always the same as
46 SCREEN_SELECTED_WINDOW (selected_screen). */ 46 SCREEN_SELECTED_WINDOW (selected_screen). */
47 47
48 Lisp_Object selected_window; 48 Lisp_Object selected_window;
49
50 #ifndef MULTI_SCREEN
51
52 /* The root window for the screen.
53 This is accessed via SCREEN_ROOT_WINDOW (selected_screen). */
54 Lisp_Object root_window;
55
56 #endif
57 49
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
61 the selected window. */ 53 the selected window. */
220 212
221 /* If that info is not correct, calculate afresh */ 213 /* If that info is not correct, calculate afresh */
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;
229 } 221 }
230 } 222 }
361 measured in characters from the upper-left corner of the screen.\n\ 353 measured in characters from the upper-left corner of the screen.\n\
362 (0 . 0) denotes the character in the upper left corner of the\n\ 354 (0 . 0) denotes the character in the upper left corner of the\n\
363 screen.\n\ 355 screen.\n\
364 If COORDINATES are in the text portion of WINDOW,\n\ 356 If 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\
366 If they are in the mode line of WINDOW, 'mode-line is returned.\n\ 358 If they are in the mode line of WINDOW, `mode-line' is returned.\n\
367 If they are on the border between WINDOW and its right sibling,\n\ 359 If 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 {
372 int x, y; 364 int x, y;
373 365
386 378
387 case 2: /* In mode line of window. */ 379 case 2: /* In mode line of window. */
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 ();
395 } 387 }
396 } 388 }
640 register struct window *o = XWINDOW (old), *p = XWINDOW (replacement); 632 register struct window *o = XWINDOW (old), *p = XWINDOW (replacement);
641 633
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;
650 p->width = o->width; 642 p->width = o->width;
651 p->height = o->height; 643 p->height = o->height;
1060 return w; 1052 return w;
1061 break; 1053 break;
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. */
1069 if (! SCREEN_VISIBLE_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w)))) 1062 if (! SCREEN_VISIBLE_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w))))
1070 || SCREEN_ICONIFIED_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w))))) 1063 || SCREEN_ICONIFIED_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w)))))
2612 selected_window = selected_screen->selected_window; 2605 selected_window = selected_screen->selected_window;
2613 last_nonminibuf_screen = selected_screen; 2606 last_nonminibuf_screen = selected_screen;
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
2646 something newer than this. */ 2640 something newer than this. */
2647 XFASTINT (XWINDOW (selected_window)->use_time) = ++window_select_count; 2641 XFASTINT (XWINDOW (selected_window)->use_time) = ++window_select_count;