Commit 6ca53601 authored by Stefan Monnier's avatar Stefan Monnier

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.
parent 94da3cf1
2005-03-31 Stefan Monnier <monnier@iro.umontreal.ca>
* 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 <handa@m17n.org>
* coding.c (syms_of_coding): Fix previous change.
2005-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c (search_embedded_absfilename): Fix last change.
2005-03-25 Kenichi Handa <handa@m17n.org>
* coding.c (syms_of_coding): Suggest to use set-coding-category in
......@@ -30,7 +42,7 @@
2005-03-26 Lennart Borgman <lennart.borgman.073@student.lu.se>
* 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.
......
......@@ -130,9 +130,7 @@ extern void _XEditResCheckMessages ();
#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 @@ 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
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment