# HG changeset patch # User Stefan Monnier # Date 1112308966 0 # Node ID 3b4e4d883374addf486d992743fd314d6e99cece # Parent cc04bb9ef8b639921f5e210742ae35493b0333ae Include ThreeD.h for XtNbeNiceToColormap. (x_create_toolkit_scroll_bar): Test XtNbeNiceToColormap before using it. Use XtNtopShadowPixel and XtNbottomShadowPixel. (x_set_toolkit_scroll_bar_thumb): Remove ugly old hack that didn't really work and that breaks with some versions of Xaw3d. diff -r cc04bb9ef8b6 -r 3b4e4d883374 src/xterm.c --- a/src/xterm.c Thu Mar 31 22:22:45 2005 +0000 +++ b/src/xterm.c Thu Mar 31 22:42:46 2005 +0000 @@ -130,9 +130,7 @@ #ifdef HAVE_XAW3D #include #include -#define ARROW_SCROLLBAR -#define XAW_ARROW_SCROLLBARS -#include +#include #else /* !HAVE_XAW3D */ #include #include @@ -4547,6 +4545,7 @@ f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; } +#ifdef XtNbeNiceToColormap /* Tell the toolkit about them. */ if (f->output_data.x->scroll_bar_top_shadow_pixel == -1 || f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) @@ -4570,16 +4569,17 @@ pixel = f->output_data.x->scroll_bar_top_shadow_pixel; if (pixel != -1) { - XtSetArg (av[ac], "topShadowPixel", pixel); + XtSetArg (av[ac], XtNtopShadowPixel, pixel); ++ac; } pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; if (pixel != -1) { - XtSetArg (av[ac], "bottomShadowPixel", pixel); + XtSetArg (av[ac], XtNbottomShadowPixel, pixel); ++ac; } } +#endif widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass, f->output_data.x->edit_widget, av, ac); @@ -4725,30 +4725,11 @@ XawScrollbarSetThumb (widget, top, shown); else { -#ifdef HAVE_XAW3D - ScrollbarWidget sb = (ScrollbarWidget) widget; - int scroll_mode = 0; - - /* `scroll_mode' only exists with Xaw3d + ARROW_SCROLLBAR. */ - if (xaw3d_arrow_scroll) - { - /* Xaw3d stupidly ignores resize requests while dragging - so we have to make it believe it's not in dragging mode. */ - scroll_mode = sb->scrollbar.scroll_mode; - if (scroll_mode == 2) - sb->scrollbar.scroll_mode = 0; - } -#endif /* Try to make the scrolling a tad smoother. */ if (!xaw3d_pick_top) shown = min (shown, old_shown); XawScrollbarSetThumb (widget, top, shown); - -#ifdef HAVE_XAW3D - if (xaw3d_arrow_scroll && scroll_mode == 2) - sb->scrollbar.scroll_mode = scroll_mode; -#endif } } }