From: Stefan Monnier Date: Thu, 31 Mar 2005 22:43:13 +0000 (+0000) Subject: Include ThreeD.h for XtNbeNiceToColormap. X-Git-Tag: ttn-vms-21-2-B4~1321 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6ca5360192fbe50abd5e43ba2ed28aa115af4d65;p=emacs.git 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 --git a/src/ChangeLog b/src/ChangeLog index 53469408d71..258948bf5d3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,19 @@ +2005-03-31 Stefan Monnier + + * xterm.c [HAVE_XAW3D]: 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. + 2005-03-31 Kenichi Handa * coding.c (syms_of_coding): Fix previous change. +2005-03-30 Stefan Monnier + + * fileio.c (search_embedded_absfilename): Fix last change. + 2005-03-25 Kenichi Handa * coding.c (syms_of_coding): Suggest to use set-coding-category in @@ -30,7 +42,7 @@ 2005-03-26 Lennart Borgman - * w32term.h (x_output): add focus_state. + * w32term.h (x_output): Add focus_state. * w32term.c (x_focus_changed, w32_detect_focus_change): New functions. (w32_read_socket) [WM_SETFOCUS]: Call w32_detect_focus_change. diff --git a/src/xterm.c b/src/xterm.c index 609ffefcbbe..fcc4c67743a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -130,9 +130,7 @@ extern void _XEditResCheckMessages (); #ifdef HAVE_XAW3D #include #include -#define ARROW_SCROLLBAR -#define XAW_ARROW_SCROLLBARS -#include +#include #else /* !HAVE_XAW3D */ #include #include @@ -4547,6 +4545,7 @@ x_create_toolkit_scroll_bar (f, bar) 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 @@ x_create_toolkit_scroll_bar (f, bar) 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 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) 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 } } }