changeset 15216:f639c5d732a3

(x_scroll_bar_set_handle): Always use start in calling SetScrollPos. (x_scroll_bar_handle_click): In line up/down cases, don't alter y. Don't call x_scroll_bar_set_handle.
author Richard M. Stallman <rms@gnu.org>
date Sat, 11 May 1996 18:38:11 +0000
parents 681866822119
children ff9f17883c5b
files src/w32term.c
diffstat 1 files changed, 14 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32term.c	Sat May 11 18:30:16 1996 +0000
+++ b/src/w32term.c	Sat May 11 18:38:11 1996 +0000
@@ -1923,9 +1923,7 @@
   XSETINT (bar->start, start);
   XSETINT (bar->end, end);
 
-  /* If we are less than half of the page use start otherwise use end */
-
-  SetScrollPos (w, SB_CTL, ((start >> 1) < bar->height)?start:end, TRUE);
+  SetScrollPos (w, SB_CTL, start, TRUE);
 
   UNBLOCK_INPUT;
 }
@@ -2138,6 +2136,7 @@
 
    This may be called from a signal handler, so we have to ignore GC
    mark bits.  */
+
 static int
 x_scroll_bar_handle_click (bar, msg, emacs_event)
      struct scroll_bar *bar;
@@ -2162,43 +2161,39 @@
     int y = GetScrollPos ((HWND) msg->msg.lParam, SB_CTL);
 
     switch (LOWORD (msg->msg.wParam))
-    {
-    case SB_THUMBTRACK:
+      {
+      case SB_THUMBTRACK:
 	emacs_event->part = scroll_bar_handle;
 	if (VERTICAL_SCROLL_BAR_TOP_RANGE (XINT (bar->height)) <= 0xffff)
 	    y = HIWORD (msg->msg.wParam);
 	break;
-    case SB_LINEDOWN:
+      case SB_LINEDOWN:
 	emacs_event->part = scroll_bar_down_arrow;
-	if (y < top_range) y++;
 	break;
-    case SB_LINEUP:
+      case SB_LINEUP:
 	emacs_event->part = scroll_bar_up_arrow;
-	if (y) y--;
 	break;
-    case SB_PAGEUP:
+      case SB_PAGEUP:
 	emacs_event->part = scroll_bar_above_handle;
 	break;
-    case SB_PAGEDOWN:
+      case SB_PAGEDOWN:
 	emacs_event->part = scroll_bar_below_handle;
 	break;
-    case SB_TOP:
+      case SB_TOP:
 	emacs_event->part = scroll_bar_handle;
 	y = 0;
 	break;
-    case SB_BOTTOM:
+      case SB_BOTTOM:
 	emacs_event->part = scroll_bar_handle;
 	y = top_range;
 	break;
-    case SB_THUMBPOSITION:
+      case SB_THUMBPOSITION:
 	emacs_event->part = scroll_bar_handle;
 	break;
-    case SB_ENDSCROLL:
-    default:
+      case SB_ENDSCROLL:
+      default:
 	return FALSE;
-    }
-
-    x_scroll_bar_set_handle (bar, y , y, 0);
+      }
 
     XSETINT (emacs_event->x, y);
     XSETINT (emacs_event->y, top_range);