(x_set_background_color): Don't change the colors
authorGerd Moellmann <gerd@gnu.org>
Thu, 6 Sep 2001 12:48:24 +0000 (12:48 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 6 Sep 2001 12:48:24 +0000 (12:48 +0000)
of the X window of scroll bar widgets.

src/ChangeLog
src/xfns.c

index 3466100cf3ed68fc10d877d69fb57f263fff4821..3a2a7b77cafe399bd2fcc3f24408e3e2d9c2bbef 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-06  Gerd Moellmann  <gerd@gnu.org>
+
+       * xfns.c (x_set_background_color): Don't change the colors
+       of the X window of scroll bar widgets.
+
 2001-09-05  Andrew Innes  <andrewi@gnu.org>
 
        * w32fns.c (w32_createwindow): Undo last change.
index d26ce6466fe4af7f8bca16fed31ebd7a6b9c9977..e180b9561efae9a0ca2f5f1b78c9fd5256d783ac 100644 (file)
@@ -1410,7 +1410,6 @@ x_set_background_color (f, arg, oldval)
   if (FRAME_X_WINDOW (f) != 0)
     {
       Display *dpy = FRAME_X_DISPLAY (f);
-      Lisp_Object bar;
       
       BLOCK_INPUT;
       XSetBackground (dpy, x->normal_gc, bg);
@@ -1418,13 +1417,19 @@ x_set_background_color (f, arg, oldval)
       XSetWindowBackground (dpy, FRAME_X_WINDOW (f), bg);
       XSetForeground (dpy, x->cursor_gc, bg);
 
-      for (bar = FRAME_SCROLL_BARS (f);
-          !NILP (bar);
-          bar = XSCROLL_BAR (bar)->next)
-       {
-         Window window = SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar));
-         XSetWindowBackground (dpy, window, bg);
-       }
+#ifndef USE_TOOLKIT_SCROLL_BARS /* Turns out to be annoying with
+                                  toolkit scroll bars.  */
+      {
+       Lisp_Object bar;
+       for (bar = FRAME_SCROLL_BARS (f);
+            !NILP (bar);
+            bar = XSCROLL_BAR (bar)->next)
+         {
+           Window window = SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar));
+           XSetWindowBackground (dpy, window, bg);
+         }
+      }
+#endif /* USE_TOOLKIT_SCROLL_BARS */
 
       UNBLOCK_INPUT;
       update_face_from_frame_parameter (f, Qbackground_color, arg);