changeset 36772:a5012395e839

(x_set_toolkit_scroll_bar_thumb) [USE_MOTIF]: Don't access private scroll bar data; it's no longer necessary with contemporary LessTif.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 13 Mar 2001 14:09:33 +0000
parents 6d432526b84f
children 31befa53434f
files src/xterm.c
diffstat 1 files changed, 4 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Tue Mar 13 13:16:37 2001 +0000
+++ b/src/xterm.c	Tue Mar 13 14:09:33 2001 +0000
@@ -8145,10 +8145,10 @@
 	UNBLOCK_INPUT;
 
 	/* At the max position of the scroll bar, do a line-wise
-	   movement.  Without doing anything, the LessTif scroll bar
-	   calls us with the same cs->value again and again.  If we
-	   want to make sure that we can reach the end of the buffer,
-	   we have to do something.
+	   movement.  Without doing anything, we would be called with
+	   the same cs->value again and again.  If we want to make
+	   sure that we can reach the end of the buffer, we have to do
+	   something.
 
 	   Implementation note: setting bar->dragging always to
 	   cs->value gives a smoother movement at the max position.
@@ -8290,14 +8290,6 @@
   BLOCK_INPUT;
 
 #ifdef USE_MOTIF
-  /* LessTif 0.85, problems:
-
-     1. When the mouse if over the scroll bar, the scroll bar will
-     get keyboard events.  I didn't find a way to turn this off.
-
-     2. Do we have to explicitly set the cursor to get an arrow
-     cursor (see below)?  */
-  
   /* Set resources.  Create the widget.  */
   XtSetArg (av[ac], XtNmappedWhenManaged, False); ++ac;
   XtSetArg (av[ac], XmNminimum, XM_SB_MIN); ++ac;
@@ -8439,8 +8431,6 @@
 #ifdef USE_MOTIF
   {
     int size, value;
-    Boolean arrow1_selected, arrow2_selected;
-    unsigned char flags;
     XmScrollBarWidget sb;
 
     /* Slider size.  Must be in the range [1 .. MAX - MIN] where MAX
@@ -8455,18 +8445,6 @@
     value = min (value, XM_SB_MAX - size);
     value = max (value, XM_SB_MIN);
 
-    /* LessTif: Calling XmScrollBarSetValues after an increment or
-       decrement turns off auto-repeat LessTif-internally.  This can
-       be seen in ScrollBar.c which resets Arrow1Selected and
-       Arrow2Selected.  It also sets internal flags so that LessTif
-       believes the mouse is in the slider.  We either have to change
-       our code, or work around that by accessing private data. */
-
-    sb = (XmScrollBarWidget) widget;
-    arrow1_selected = sb->scrollBar.arrow1_selected;
-    arrow2_selected = sb->scrollBar.arrow2_selected;
-    flags = sb->scrollBar.flags;
-    
     if (NILP (bar->dragging))
       XmScrollBarSetValues (widget, value, size, 0, 0, False);
     else if (last_scroll_bar_part == scroll_bar_down_arrow)
@@ -8486,10 +8464,6 @@
 			      min (size, XM_SB_RANGE - old_value),
 			      0, 0, False);
       }
-    
-    sb->scrollBar.arrow1_selected = arrow1_selected;
-    sb->scrollBar.arrow2_selected = arrow2_selected;
-    sb->scrollBar.flags = flags;
   }
 #else /* !USE_MOTIF i.e. use Xaw */
   {