aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKim F. Storm2006-04-17 21:50:59 +0000
committerKim F. Storm2006-04-17 21:50:59 +0000
commit3f489dc760ec721fc098e5916efde3e10677980f (patch)
tree88f50b1922a4fe4fd2e92a7c1e1aebe4f95e36c5 /src/window.c
parent39d7883583b8d6bb93bcaf61d5a1a81f8c1876ae (diff)
downloademacs-3f489dc760ec721fc098e5916efde3e10677980f.tar.gz
emacs-3f489dc760ec721fc098e5916efde3e10677980f.zip
(window_loop): Test w->dedicated with !NILP instead of EQ Qt.
(window_scroll_pixel_based): Fix off-by-one bug in 2002-12-23 change.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index 648ac5b939c..9b303a05002 100644
--- a/src/window.c
+++ b/src/window.c
@@ -662,6 +662,8 @@ coordinates_in_window (w, x, y)
662 { 662 {
663 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width) 663 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width)
664 { 664 {
665 /* Convert X and Y to window relative coordinates.
666 Vertical border is at the left edge of window. */
665 *x = max (0, *x - x0); 667 *x = max (0, *x - x0);
666 *y -= top_y; 668 *y -= top_y;
667 return ON_VERTICAL_BORDER; 669 return ON_VERTICAL_BORDER;
@@ -671,6 +673,8 @@ coordinates_in_window (w, x, y)
671 { 673 {
672 if (abs (*x - x1) < grabbable_width) 674 if (abs (*x - x1) < grabbable_width)
673 { 675 {
676 /* Convert X and Y to window relative coordinates.
677 Vertical border is at the right edge of window. */
674 *x = min (x1, *x) - x0; 678 *x = min (x1, *x) - x0;
675 *y -= top_y; 679 *y -= top_y;
676 return ON_VERTICAL_BORDER; 680 return ON_VERTICAL_BORDER;
@@ -717,6 +721,8 @@ coordinates_in_window (w, x, y)
717 && !WINDOW_RIGHTMOST_P (w) 721 && !WINDOW_RIGHTMOST_P (w)
718 && (abs (*x - right_x) < grabbable_width)) 722 && (abs (*x - right_x) < grabbable_width))
719 { 723 {
724 /* Convert X and Y to window relative coordinates.
725 Vertical border is at the right edge of window. */
720 *x = min (right_x, *x) - left_x; 726 *x = min (right_x, *x) - left_x;
721 *y -= top_y; 727 *y -= top_y;
722 return ON_VERTICAL_BORDER; 728 return ON_VERTICAL_BORDER;
@@ -2027,7 +2033,7 @@ window_loop (type, obj, mini, frames)
2027 `obj & 1' means consider only full-width windows. 2033 `obj & 1' means consider only full-width windows.
2028 `obj & 2' means consider also dedicated windows. */ 2034 `obj & 2' means consider also dedicated windows. */
2029 if (((XINT (obj) & 1) && !WINDOW_FULL_WIDTH_P (w)) 2035 if (((XINT (obj) & 1) && !WINDOW_FULL_WIDTH_P (w))
2030 || (!(XINT (obj) & 2) && EQ (w->dedicated, Qt)) 2036 || (!(XINT (obj) & 2) && !NILP (w->dedicated))
2031 /* Minibuffer windows are always ignored. */ 2037 /* Minibuffer windows are always ignored. */
2032 || MINI_WINDOW_P (w)) 2038 || MINI_WINDOW_P (w))
2033 break; 2039 break;
@@ -2082,7 +2088,7 @@ window_loop (type, obj, mini, frames)
2082 case GET_LARGEST_WINDOW: 2088 case GET_LARGEST_WINDOW:
2083 { /* nil `obj' means to ignore dedicated windows. */ 2089 { /* nil `obj' means to ignore dedicated windows. */
2084 /* Ignore dedicated windows and minibuffers. */ 2090 /* Ignore dedicated windows and minibuffers. */
2085 if (MINI_WINDOW_P (w) || (NILP (obj) && EQ (w->dedicated, Qt))) 2091 if (MINI_WINDOW_P (w) || (NILP (obj) && !NILP (w->dedicated)))
2086 break; 2092 break;
2087 2093
2088 if (NILP (best_window)) 2094 if (NILP (best_window))
@@ -4868,7 +4874,7 @@ window_scroll_pixel_based (window, n, whole, noerror)
4868 { 4874 {
4869 if (it.current_y < it.last_visible_y 4875 if (it.current_y < it.last_visible_y
4870 && (it.current_y + it.max_ascent + it.max_descent 4876 && (it.current_y + it.max_ascent + it.max_descent
4871 >= it.last_visible_y)) 4877 > it.last_visible_y))
4872 { 4878 {
4873 /* The last line was only partially visible, make it fully 4879 /* The last line was only partially visible, make it fully
4874 visible. */ 4880 visible. */