Mercurial > emacs
changeset 61181:3b4e4d883374
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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 31 Mar 2005 22:42:46 +0000 |
parents | cc04bb9ef8b6 |
children | deabd7fb7548 |
files | src/xterm.c |
diffstat | 1 files changed, 5 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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 <X11/Xaw3d/Simple.h> #include <X11/Xaw3d/Scrollbar.h> -#define ARROW_SCROLLBAR -#define XAW_ARROW_SCROLLBARS -#include <X11/Xaw3d/ScrollbarP.h> +#include <X11/Xaw3d/ThreeD.h> #else /* !HAVE_XAW3D */ #include <X11/Xaw/Simple.h> #include <X11/Xaw/Scrollbar.h> @@ -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 } } }