]> git.eshelyaron.com Git - emacs.git/commitdiff
Include ThreeD.h for XtNbeNiceToColormap.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 31 Mar 2005 22:43:13 +0000 (22:43 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 31 Mar 2005 22:43:13 +0000 (22:43 +0000)
(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.

src/ChangeLog
src/xterm.c

index 53469408d711a296159a5a3fdb8e4554f01e0f65..258948bf5d393cedc9281bca09fbe6a77c462a21 100644 (file)
@@ -1,7 +1,19 @@
+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.
index 609ffefcbbe02145ba0789ecbe375d2f1af5b176..fcc4c67743a9ecc5a7cb0dedab0825ebbd2477d9 100644 (file)
@@ -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
          }
       }
   }