comparison src/window.c @ 36127:f03dfbb443ce

(coordinates_in_window): Increase width of area where the vertical line can be dragged.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 16 Feb 2001 14:56:44 +0000
parents acd9eaaa94c1
children ce0ddc7706bc
comparison
equal deleted inserted replaced
36126:725a419874b0 36127:f03dfbb443ce
524 int flags_area_width = FRAME_LEFT_FLAGS_AREA_WIDTH (f); 524 int flags_area_width = FRAME_LEFT_FLAGS_AREA_WIDTH (f);
525 enum window_part part; 525 enum window_part part;
526 int ux = CANON_X_UNIT (f), uy = CANON_Y_UNIT (f); 526 int ux = CANON_X_UNIT (f), uy = CANON_Y_UNIT (f);
527 int x0 = XFASTINT (w->left) * ux; 527 int x0 = XFASTINT (w->left) * ux;
528 int x1 = x0 + XFASTINT (w->width) * ux; 528 int x1 = x0 + XFASTINT (w->width) * ux;
529 /* The width of the area where the vertical line can be dragged.
530 (Between mode lines for instance. */
531 int grabbable_width = ux;
529 532
530 if (*x < x0 || *x >= x1) 533 if (*x < x0 || *x >= x1)
531 return ON_NOTHING; 534 return ON_NOTHING;
532 535
533 /* In what's below, we subtract 1 when computing right_x because we 536 /* In what's below, we subtract 1 when computing right_x because we
565 return the right window. */ 568 return the right window. */
566 part = ON_MODE_LINE; 569 part = ON_MODE_LINE;
567 570
568 if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) 571 if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f))
569 { 572 {
570 if (abs (*x - x0) < ux / 2) 573 if (abs (*x - x0) < grabbable_width)
571 part = ON_VERTICAL_BORDER; 574 part = ON_VERTICAL_BORDER;
572 } 575 }
573 else if (!WINDOW_RIGHTMOST_P (w) && abs (*x - x1) < ux / 2) 576 else if (!WINDOW_RIGHTMOST_P (w) && abs (*x - x1) < grabbable_width)
574 part = ON_VERTICAL_BORDER; 577 part = ON_VERTICAL_BORDER;
575 } 578 }
576 else if (WINDOW_WANTS_HEADER_LINE_P (w) 579 else if (WINDOW_WANTS_HEADER_LINE_P (w)
577 && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w) 580 && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w)
578 && *y >= top_y) 581 && *y >= top_y)
579 { 582 {
580 part = ON_HEADER_LINE; 583 part = ON_HEADER_LINE;
581 584
582 if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) 585 if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f))
583 { 586 {
584 if (abs (*x - x0) < ux / 2) 587 if (abs (*x - x0) < grabbable_width)
585 part = ON_VERTICAL_BORDER; 588 part = ON_VERTICAL_BORDER;
586 } 589 }
587 else if (!WINDOW_RIGHTMOST_P (w) && abs (*x - x1) < ux / 2) 590 else if (!WINDOW_RIGHTMOST_P (w) && abs (*x - x1) < grabbable_width)
588 part = ON_VERTICAL_BORDER; 591 part = ON_VERTICAL_BORDER;
589 } 592 }
590 /* Outside anything interesting? */ 593 /* Outside anything interesting? */
591 else if (*y < top_y 594 else if (*y < top_y
592 || *y >= bottom_y 595 || *y >= bottom_y
602 else if (FRAME_WINDOW_P (f)) 605 else if (FRAME_WINDOW_P (f))
603 { 606 {
604 if (!w->pseudo_window_p 607 if (!w->pseudo_window_p
605 && !FRAME_HAS_VERTICAL_SCROLL_BARS (f) 608 && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)
606 && !WINDOW_RIGHTMOST_P (w) 609 && !WINDOW_RIGHTMOST_P (w)
607 && (abs (*x - right_x - flags_area_width) < ux / 2)) 610 && (abs (*x - right_x - flags_area_width) < grabbable_width))
608 { 611 {
609 part = ON_VERTICAL_BORDER; 612 part = ON_VERTICAL_BORDER;
610 } 613 }
611 else if (*x < left_x || *x > right_x) 614 else if (*x < left_x || *x > right_x)
612 { 615 {