]> Pileus Git - ~andy/gtk/commitdiff
More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
authorOwen Taylor <otaylor@redhat.com>
Mon, 9 Dec 2002 02:02:27 +0000 (02:02 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 9 Dec 2002 02:02:27 +0000 (02:02 +0000)
Sun Dec  8 20:32:23 2002  Owen Taylor  <otaylor@redhat.com>

        More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)

        * gdk/x11/gdkcolor-x11.c (gdk_colors_free)
        (gdk_colormap_free_colors): Don't call XFreeColors() for
        private colorsmaps.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
        gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
        Fix return values to return number remaining not number
        allocated.

        * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
        gdk_colormap_alloc_colors_private): Clean up some a stray
        initializations.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkcolor-x11.c

index 66fa3f7b86aa1d3eb7ee78da4812239126755a6e..0afdaeb2ea08b11c1612b85c3866ccebd53fc637 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Sun Dec  8 20:32:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colors_free) 
+       (gdk_colormap_free_colors): Don't call XFreeColors() for  
+       private colorsmaps.
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
+       gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
+       Fix return values to return number remaining not number
+       allocated.
+       
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
+       gdk_colormap_alloc_colors_private): Clean up some a stray 
+       initializations.
+
 Sun Dec  8 20:19:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 66fa3f7b86aa1d3eb7ee78da4812239126755a6e..0afdaeb2ea08b11c1612b85c3866ccebd53fc637 100644 (file)
@@ -1,3 +1,20 @@
+Sun Dec  8 20:32:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colors_free) 
+       (gdk_colormap_free_colors): Don't call XFreeColors() for  
+       private colorsmaps.
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
+       gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
+       Fix return values to return number remaining not number
+       allocated.
+       
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
+       gdk_colormap_alloc_colors_private): Clean up some a stray 
+       initializations.
+
 Sun Dec  8 20:19:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 66fa3f7b86aa1d3eb7ee78da4812239126755a6e..0afdaeb2ea08b11c1612b85c3866ccebd53fc637 100644 (file)
@@ -1,3 +1,20 @@
+Sun Dec  8 20:32:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colors_free) 
+       (gdk_colormap_free_colors): Don't call XFreeColors() for  
+       private colorsmaps.
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
+       gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
+       Fix return values to return number remaining not number
+       allocated.
+       
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
+       gdk_colormap_alloc_colors_private): Clean up some a stray 
+       initializations.
+
 Sun Dec  8 20:19:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 66fa3f7b86aa1d3eb7ee78da4812239126755a6e..0afdaeb2ea08b11c1612b85c3866ccebd53fc637 100644 (file)
@@ -1,3 +1,20 @@
+Sun Dec  8 20:32:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colors_free) 
+       (gdk_colormap_free_colors): Don't call XFreeColors() for  
+       private colorsmaps.
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
+       gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
+       Fix return values to return number remaining not number
+       allocated.
+       
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
+       gdk_colormap_alloc_colors_private): Clean up some a stray 
+       initializations.
+
 Sun Dec  8 20:19:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 66fa3f7b86aa1d3eb7ee78da4812239126755a6e..0afdaeb2ea08b11c1612b85c3866ccebd53fc637 100644 (file)
@@ -1,3 +1,20 @@
+Sun Dec  8 20:32:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colors_free) 
+       (gdk_colormap_free_colors): Don't call XFreeColors() for  
+       private colorsmaps.
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
+       gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
+       Fix return values to return number remaining not number
+       allocated.
+       
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
+       gdk_colormap_alloc_colors_private): Clean up some a stray 
+       initializations.
+
 Sun Dec  8 20:19:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 66fa3f7b86aa1d3eb7ee78da4812239126755a6e..0afdaeb2ea08b11c1612b85c3866ccebd53fc637 100644 (file)
@@ -1,3 +1,20 @@
+Sun Dec  8 20:32:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       More fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colors_free) 
+       (gdk_colormap_free_colors): Don't call XFreeColors() for  
+       private colorsmaps.
+
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_writeable,
+       gdk_colormap_colors_private, gdk_colormap_alloc_colors_shared):
+       Fix return values to return number remaining not number
+       allocated.
+       
+       * gdk/x11/gdkcolor-x11.c (gdk_colormap_alloc_colors_shared,
+       gdk_colormap_alloc_colors_private): Clean up some a stray 
+       initializations.
+
 Sun Dec  8 20:19:22 2002  Owen Taylor  <otaylor@redhat.com>
 
        Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
index 7282d6a329e687915c1e23a0e84149b3af1aaa7d..5cc43e136a7881f257d0435e33a51f1a7ad02ec9 100644 (file)
@@ -658,7 +658,7 @@ gdk_colors_free (GdkColormap *colormap,
        }
     }
 
-  if (npixels_to_free && !private->screen->closed)
+  if (npixels_to_free && !private->private_val && !private->screen->closed)
     XFreeColors (GDK_SCREEN_XDISPLAY (private->screen), private->xcolormap,
                 pixels_to_free, npixels_to_free, planes);
   g_free (pixels_to_free);
@@ -715,7 +715,7 @@ gdk_colormap_free_colors (GdkColormap *colormap,
        }
     }
 
-  if (npixels && !private->screen->closed)
+  if (npixels_to_free && !private->private_val && !private->screen->closed)
     XFreeColors (GDK_SCREEN_XDISPLAY (private->screen), private->xcolormap,
                 pixels, npixels, 0);
 
@@ -811,7 +811,7 @@ gdk_colormap_alloc_colors_writeable (GdkColormap *colormap,
          else
            break;
        }
-      return i;
+      return ncolors - i;
     }
   else
     {
@@ -832,7 +832,7 @@ gdk_colormap_alloc_colors_writeable (GdkColormap *colormap,
       
       g_free (pixels);
 
-      return status ? ncolors : 0
+      return status ? 0 : ncolors
     }
 }
 
@@ -851,7 +851,6 @@ gdk_colormap_alloc_colors_private (GdkColormap *colormap,
   gint nremaining = 0;
   
   private = GDK_COLORMAP_PRIVATE_DATA (colormap);
-  index = -1;
 
   /* First, store the colors we have room for */
 
@@ -913,7 +912,7 @@ gdk_colormap_alloc_colors_private (GdkColormap *colormap,
       g_free (available);
     }
 
-  return (ncolors - nremaining);
+  return nremaining;
 }
 
 static gint
@@ -930,7 +929,6 @@ gdk_colormap_alloc_colors_shared (GdkColormap *colormap,
   gint nfailed = 0;
 
   private = GDK_COLORMAP_PRIVATE_DATA (colormap);
-  index = -1;
 
   for (i=0; i<ncolors; i++)
     {
@@ -1005,7 +1003,7 @@ gdk_colormap_alloc_colors_shared (GdkColormap *colormap,
       nremaining = nfailed;
     }
   
-  return (ncolors - nremaining);
+  return nremaining;
 }
 
 static gint