aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 0c1f7ddab74..ebd0954edb7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -129,9 +129,7 @@ extern void _XEditResCheckMessages ();
129#ifdef HAVE_XAW3D 129#ifdef HAVE_XAW3D
130#include <X11/Xaw3d/Simple.h> 130#include <X11/Xaw3d/Simple.h>
131#include <X11/Xaw3d/Scrollbar.h> 131#include <X11/Xaw3d/Scrollbar.h>
132#define ARROW_SCROLLBAR 132#include <X11/Xaw3d/ThreeD.h>
133#define XAW_ARROW_SCROLLBARS
134#include <X11/Xaw3d/ScrollbarP.h>
135#else /* !HAVE_XAW3D */ 133#else /* !HAVE_XAW3D */
136#include <X11/Xaw/Simple.h> 134#include <X11/Xaw/Simple.h>
137#include <X11/Xaw/Scrollbar.h> 135#include <X11/Xaw/Scrollbar.h>
@@ -4560,6 +4558,7 @@ x_create_toolkit_scroll_bar (f, bar)
4560 f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; 4558 f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel;
4561 } 4559 }
4562 4560
4561#ifdef XtNbeNiceToColormap
4563 /* Tell the toolkit about them. */ 4562 /* Tell the toolkit about them. */
4564 if (f->output_data.x->scroll_bar_top_shadow_pixel == -1 4563 if (f->output_data.x->scroll_bar_top_shadow_pixel == -1
4565 || f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) 4564 || f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
@@ -4583,16 +4582,17 @@ x_create_toolkit_scroll_bar (f, bar)
4583 pixel = f->output_data.x->scroll_bar_top_shadow_pixel; 4582 pixel = f->output_data.x->scroll_bar_top_shadow_pixel;
4584 if (pixel != -1) 4583 if (pixel != -1)
4585 { 4584 {
4586 XtSetArg (av[ac], "topShadowPixel", pixel); 4585 XtSetArg (av[ac], XtNtopShadowPixel, pixel);
4587 ++ac; 4586 ++ac;
4588 } 4587 }
4589 pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; 4588 pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel;
4590 if (pixel != -1) 4589 if (pixel != -1)
4591 { 4590 {
4592 XtSetArg (av[ac], "bottomShadowPixel", pixel); 4591 XtSetArg (av[ac], XtNbottomShadowPixel, pixel);
4593 ++ac; 4592 ++ac;
4594 } 4593 }
4595 } 4594 }
4595#endif
4596 4596
4597 widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass, 4597 widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass,
4598 f->output_data.x->edit_widget, av, ac); 4598 f->output_data.x->edit_widget, av, ac);
@@ -4738,30 +4738,11 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
4738 XawScrollbarSetThumb (widget, top, shown); 4738 XawScrollbarSetThumb (widget, top, shown);
4739 else 4739 else
4740 { 4740 {
4741#ifdef HAVE_XAW3D
4742 ScrollbarWidget sb = (ScrollbarWidget) widget;
4743 int scroll_mode = 0;
4744
4745 /* `scroll_mode' only exists with Xaw3d + ARROW_SCROLLBAR. */
4746 if (xaw3d_arrow_scroll)
4747 {
4748 /* Xaw3d stupidly ignores resize requests while dragging
4749 so we have to make it believe it's not in dragging mode. */
4750 scroll_mode = sb->scrollbar.scroll_mode;
4751 if (scroll_mode == 2)
4752 sb->scrollbar.scroll_mode = 0;
4753 }
4754#endif
4755 /* Try to make the scrolling a tad smoother. */ 4741 /* Try to make the scrolling a tad smoother. */
4756 if (!xaw3d_pick_top) 4742 if (!xaw3d_pick_top)
4757 shown = min (shown, old_shown); 4743 shown = min (shown, old_shown);
4758 4744
4759 XawScrollbarSetThumb (widget, top, shown); 4745 XawScrollbarSetThumb (widget, top, shown);
4760
4761#ifdef HAVE_XAW3D
4762 if (xaw3d_arrow_scroll && scroll_mode == 2)
4763 sb->scrollbar.scroll_mode = scroll_mode;
4764#endif
4765 } 4746 }
4766 } 4747 }
4767 } 4748 }