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. */ |
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; |
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; |
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. */ |
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. */ |
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) |
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 |
} |
} |