/[emacs]/emacs/src/window.c
ViewVC logotype

Diff of /emacs/src/window.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.388 by pj, Fri Nov 2 20:36:19 2001 UTC revision 1.389 by kfstorm, Fri Nov 16 13:08:08 2001 UTC
# Line 497  and BOTTOM is one more than the bottommo Line 497  and BOTTOM is one more than the bottommo
497     if it is on the border between the window and its right sibling,     if it is on the border between the window and its right sibling,
498        return 3.        return 3.
499     if it is on the window's top line, return 4;     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,     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.     return 5 or 6, and convert *X and *Y to window-relative corrdinates.
502    
503     X and Y are frame relative pixel coordinates.  */     X and Y are frame relative pixel coordinates.  */
# Line 511  coordinates_in_window (w, x, y) Line 511  coordinates_in_window (w, x, y)
511       everywhere.  */       everywhere.  */
512    struct frame *f = XFRAME (WINDOW_FRAME (w));    struct frame *f = XFRAME (WINDOW_FRAME (w));
513    int left_x, right_x, top_y, bottom_y;    int left_x, right_x, top_y, bottom_y;
514    int flags_area_width = FRAME_LEFT_FLAGS_AREA_WIDTH (f);    int fringe_width = FRAME_LEFT_FRINGE_WIDTH (f);
515    enum window_part part;    enum window_part part;
516    int ux = CANON_X_UNIT (f);    int ux = CANON_X_UNIT (f);
517    int x0 = XFASTINT (w->left) * ux;    int x0 = XFASTINT (w->left) * ux;
# Line 584  coordinates_in_window (w, x, y) Line 584  coordinates_in_window (w, x, y)
584    else if (*y < top_y    else if (*y < top_y
585             || *y >= bottom_y             || *y >= bottom_y
586             || *x < (left_x             || *x < (left_x
587                      - flags_area_width                      - fringe_width
588                      - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * ux)                      - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * ux)
589             || *x > (right_x             || *x > (right_x
590                      + flags_area_width                      + fringe_width
591                      + FRAME_RIGHT_SCROLL_BAR_WIDTH (f) * ux))                      + FRAME_RIGHT_SCROLL_BAR_WIDTH (f) * ux))
592      {      {
593        part = ON_NOTHING;        part = ON_NOTHING;
# Line 597  coordinates_in_window (w, x, y) Line 597  coordinates_in_window (w, x, y)
597        if (!w->pseudo_window_p        if (!w->pseudo_window_p
598            && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)            && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)
599            && !WINDOW_RIGHTMOST_P (w)            && !WINDOW_RIGHTMOST_P (w)
600            && (abs (*x - right_x - flags_area_width) < grabbable_width))            && (abs (*x - right_x - fringe_width) < grabbable_width))
601          {          {
602            part = ON_VERTICAL_BORDER;            part = ON_VERTICAL_BORDER;
603          }          }
604        else if (*x < left_x || *x > right_x)        else if (*x < left_x || *x > right_x)
605          {          {
606            /* Other lines than the mode line don't include flags areas and            /* Other lines than the mode line don't include fringes and
607               scroll bars on the left.  */               scroll bars on the left.  */
608                
609            /* Convert X and Y to window-relative pixel coordinates.  */            /* Convert X and Y to window-relative pixel coordinates.  */
# Line 624  coordinates_in_window (w, x, y) Line 624  coordinates_in_window (w, x, y)
624           terminals, the vertical line's x coordinate is right_x.  */           terminals, the vertical line's x coordinate is right_x.  */
625        if (*x < left_x || *x > right_x)        if (*x < left_x || *x > right_x)
626          {          {
627            /* Other lines than the mode line don't include flags areas and            /* Other lines than the mode line don't include fringes and
628               scroll bars on the left.  */               scroll bars on the left.  */
629                
630            /* Convert X and Y to window-relative pixel coordinates.  */            /* Convert X and Y to window-relative pixel coordinates.  */
# Line 665  If COORDINATES are in the text portion o Line 665  If COORDINATES are in the text portion o
665     the coordinates relative to the window are returned.     the coordinates relative to the window are returned.
666  If they are in the mode line of WINDOW, `mode-line' is returned.  If they are in the mode line of WINDOW, `mode-line' is returned.
667  If they are in the top mode line of WINDOW, `header-line' is returned.  If they are in the top mode line of WINDOW, `header-line' is returned.
668  If they are in the fringe to the left of the window,  If 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  If they are in the right fringe of WINDOW, `right-fringe' is returned.
    the window, `right-fringe' is returned.  
670  If they are on the border between WINDOW and its right sibling,  If they are on the border between WINDOW and its right sibling,
671    `vertical-line' is returned.  */)    `vertical-line' is returned.  */)
672       (coordinates, window)       (coordinates, window)
# Line 3876  window_internal_width (w) Line 3875  window_internal_width (w)
3875      width -= 1;      width -= 1;
3876    
3877    /* On window-systems, areas to the left and right of the window    /* On window-systems, areas to the left and right of the window
3878       are used to display bitmaps there.  */       are used as fringes.  */
3879    if (FRAME_WINDOW_P (f))    if (FRAME_WINDOW_P (f))
3880      width -= FRAME_FLAGS_AREA_COLS (f);      width -= FRAME_FRINGE_COLS (f);
3881    
3882    return width;    return width;
3883  }  }

Legend:
Removed from v.1.388  
changed lines
  Added in v.1.389

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26