emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src ChangeLog xterm.c


From: Jan Djärv
Subject: [Emacs-diffs] emacs/src ChangeLog xterm.c
Date: Mon, 19 Oct 2009 18:08:55 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Jan Djärv <jhd> 09/10/19 18:08:55

Modified files:
        src            : ChangeLog xterm.c 

Log message:
        (x_create_toolkit_scroll_bar): Don't allocate color for
        pixel -1 (bug #4742).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7802&r2=1.7803
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xterm.c?cvsroot=emacs&r1=1.1045&r2=1.1046

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7802
retrieving revision 1.7803
diff -u -b -r1.7802 -r1.7803
--- ChangeLog   19 Oct 2009 16:58:18 -0000      1.7802
+++ ChangeLog   19 Oct 2009 18:08:53 -0000      1.7803
@@ -1,3 +1,8 @@
+2009-10-19  Jan Djärv  <address@hidden>
+
+       * xterm.c (x_create_toolkit_scroll_bar): Don't allocate color for
+       pixel -1 (bug #4742).
+
 2009-10-19  Dan Nicolaescu  <address@hidden>
 
        * process.c (create_pty): Remove conditionals for no longer

Index: xterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xterm.c,v
retrieving revision 1.1045
retrieving revision 1.1046
diff -u -b -r1.1045 -r1.1046
--- xterm.c     19 Oct 2009 05:11:08 -0000      1.1045
+++ xterm.c     19 Oct 2009 18:08:55 -0000      1.1046
@@ -4633,19 +4633,27 @@
   if (f->output_data.x->scroll_bar_top_shadow_pixel == -1)
     {
       pixel = f->output_data.x->scroll_bar_background_pixel;
-      if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
+      if (pixel != -1) 
+        {
+          if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
+                                      FRAME_X_COLORMAP (f),
                                  &pixel, 1.2, 0x8000))
        pixel = -1;
       f->output_data.x->scroll_bar_top_shadow_pixel = pixel;
     }
+    }
   if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
     {
       pixel = f->output_data.x->scroll_bar_background_pixel;
-      if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
+      if (pixel != -1) 
+        {
+          if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
+                                      FRAME_X_COLORMAP (f),
                                  &pixel, 0.6, 0x4000))
        pixel = -1;
       f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel;
     }
+    }
 
 #ifdef XtNbeNiceToColormap
   /* Tell the toolkit about them.  */
@@ -10433,6 +10441,7 @@
            || !strcmp (SDATA (value), "on")))
       XSynchronize (dpyinfo->display, True);
   }
+  XSynchronize (dpyinfo->display, True);
 
   {
     Lisp_Object value;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]