aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKim F. Storm2001-11-16 13:08:08 +0000
committerKim F. Storm2001-11-16 13:08:08 +0000
commit81d189fdcb346703dd2a264200ab3c24f0a8a72a (patch)
tree2d5a5e9295eb1257b5d2368376927e4c1b222c62 /src/window.c
parent5f395df3b03409674d3ecf81a93409058970baa2 (diff)
downloademacs-81d189fdcb346703dd2a264200ab3c24f0a8a72a.tar.gz
emacs-81d189fdcb346703dd2a264200ab3c24f0a8a72a.zip
Fringe cleanup.
Comment fixes. Use renamed symbols. (coordinates-in-window-p): Doc fix.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/window.c b/src/window.c
index 94a9678baac..1635bff3a0f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -497,7 +497,7 @@ and BOTTOM is one more than the bottommost row used by WINDOW
497 if it is on the border between the window and its right sibling, 497 if it is on the border between the window and its right sibling,
498 return 3. 498 return 3.
499 if it is on the window's top line, return 4; 499 if it is on the window's top line, return 4;
500 if it is in the bitmap area to the left/right of the window, 500 if it is in left or right fringe of the window,
501 return 5 or 6, and convert *X and *Y to window-relative corrdinates. 501 return 5 or 6, and convert *X and *Y to window-relative corrdinates.
502 502
503 X and Y are frame relative pixel coordinates. */ 503 X and Y are frame relative pixel coordinates. */
@@ -511,7 +511,7 @@ coordinates_in_window (w, x, y)
511 everywhere. */ 511 everywhere. */
512 struct frame *f = XFRAME (WINDOW_FRAME (w)); 512 struct frame *f = XFRAME (WINDOW_FRAME (w));
513 int left_x, right_x, top_y, bottom_y; 513 int left_x, right_x, top_y, bottom_y;
514 int flags_area_width = FRAME_LEFT_FLAGS_AREA_WIDTH (f); 514 int fringe_width = FRAME_LEFT_FRINGE_WIDTH (f);
515 enum window_part part; 515 enum window_part part;
516 int ux = CANON_X_UNIT (f); 516 int ux = CANON_X_UNIT (f);
517 int x0 = XFASTINT (w->left) * ux; 517 int x0 = XFASTINT (w->left) * ux;
@@ -584,10 +584,10 @@ coordinates_in_window (w, x, y)
584 else if (*y < top_y 584 else if (*y < top_y
585 || *y >= bottom_y 585 || *y >= bottom_y
586 || *x < (left_x 586 || *x < (left_x
587 - flags_area_width 587 - fringe_width
588 - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * ux) 588 - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * ux)
589 || *x > (right_x 589 || *x > (right_x
590 + flags_area_width 590 + fringe_width
591 + FRAME_RIGHT_SCROLL_BAR_WIDTH (f) * ux)) 591 + FRAME_RIGHT_SCROLL_BAR_WIDTH (f) * ux))
592 { 592 {
593 part = ON_NOTHING; 593 part = ON_NOTHING;
@@ -597,13 +597,13 @@ coordinates_in_window (w, x, y)
597 if (!w->pseudo_window_p 597 if (!w->pseudo_window_p
598 && !FRAME_HAS_VERTICAL_SCROLL_BARS (f) 598 && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)
599 && !WINDOW_RIGHTMOST_P (w) 599 && !WINDOW_RIGHTMOST_P (w)
600 && (abs (*x - right_x - flags_area_width) < grabbable_width)) 600 && (abs (*x - right_x - fringe_width) < grabbable_width))
601 { 601 {
602 part = ON_VERTICAL_BORDER; 602 part = ON_VERTICAL_BORDER;
603 } 603 }
604 else if (*x < left_x || *x > right_x) 604 else if (*x < left_x || *x > right_x)
605 { 605 {
606 /* Other lines than the mode line don't include flags areas and 606 /* Other lines than the mode line don't include fringes and
607 scroll bars on the left. */ 607 scroll bars on the left. */
608 608
609 /* Convert X and Y to window-relative pixel coordinates. */ 609 /* Convert X and Y to window-relative pixel coordinates. */
@@ -624,7 +624,7 @@ coordinates_in_window (w, x, y)
624 terminals, the vertical line's x coordinate is right_x. */ 624 terminals, the vertical line's x coordinate is right_x. */
625 if (*x < left_x || *x > right_x) 625 if (*x < left_x || *x > right_x)
626 { 626 {
627 /* Other lines than the mode line don't include flags areas and 627 /* Other lines than the mode line don't include fringes and
628 scroll bars on the left. */ 628 scroll bars on the left. */
629 629
630 /* Convert X and Y to window-relative pixel coordinates. */ 630 /* Convert X and Y to window-relative pixel coordinates. */
@@ -665,9 +665,8 @@ If COORDINATES are in the text portion of WINDOW,
665 the coordinates relative to the window are returned. 665 the coordinates relative to the window are returned.
666If they are in the mode line of WINDOW, `mode-line' is returned. 666If they are in the mode line of WINDOW, `mode-line' is returned.
667If they are in the top mode line of WINDOW, `header-line' is returned. 667If they are in the top mode line of WINDOW, `header-line' is returned.
668If they are in the fringe to the left of the window, 668If they are in the left fringe of WINDOW, `left-fringe' is returned.
669 `left-fringe' is returned, if they are in the area on the right of 669If they are in the right fringe of WINDOW, `right-fringe' is returned.
670 the window, `right-fringe' is returned.
671If they are on the border between WINDOW and its right sibling, 670If they are on the border between WINDOW and its right sibling,
672 `vertical-line' is returned. */) 671 `vertical-line' is returned. */)
673 (coordinates, window) 672 (coordinates, window)
@@ -3876,9 +3875,9 @@ window_internal_width (w)
3876 width -= 1; 3875 width -= 1;
3877 3876
3878 /* On window-systems, areas to the left and right of the window 3877 /* On window-systems, areas to the left and right of the window
3879 are used to display bitmaps there. */ 3878 are used as fringes. */
3880 if (FRAME_WINDOW_P (f)) 3879 if (FRAME_WINDOW_P (f))
3881 width -= FRAME_FLAGS_AREA_COLS (f); 3880 width -= FRAME_FRINGE_COLS (f);
3882 3881
3883 return width; 3882 return width;
3884} 3883}