+Sun Dec 8 20:19:22 2002 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_foreign_new):
+ Fix typo that caused us to always return the system
+ colormap.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_colormap_new): When allocating
+ a private colormap and copying the system palette
+ to prevent flashing, handle colormap->size greater than
+ system_colormap->size.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_get_xdisplay):
+ Get rid of the last remains of private->xdisplay
+ in favor of using private->screen.
+
2002-12-09 Tor Lillqvist <tml@iki.fi>
Merge from stable:
+Sun Dec 8 20:19:22 2002 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_foreign_new):
+ Fix typo that caused us to always return the system
+ colormap.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_colormap_new): When allocating
+ a private colormap and copying the system palette
+ to prevent flashing, handle colormap->size greater than
+ system_colormap->size.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_get_xdisplay):
+ Get rid of the last remains of private->xdisplay
+ in favor of using private->screen.
+
2002-12-09 Tor Lillqvist <tml@iki.fi>
Merge from stable:
+Sun Dec 8 20:19:22 2002 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_foreign_new):
+ Fix typo that caused us to always return the system
+ colormap.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_colormap_new): When allocating
+ a private colormap and copying the system palette
+ to prevent flashing, handle colormap->size greater than
+ system_colormap->size.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_get_xdisplay):
+ Get rid of the last remains of private->xdisplay
+ in favor of using private->screen.
+
2002-12-09 Tor Lillqvist <tml@iki.fi>
Merge from stable:
+Sun Dec 8 20:19:22 2002 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_foreign_new):
+ Fix typo that caused us to always return the system
+ colormap.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_colormap_new): When allocating
+ a private colormap and copying the system palette
+ to prevent flashing, handle colormap->size greater than
+ system_colormap->size.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_get_xdisplay):
+ Get rid of the last remains of private->xdisplay
+ in favor of using private->screen.
+
2002-12-09 Tor Lillqvist <tml@iki.fi>
Merge from stable:
+Sun Dec 8 20:19:22 2002 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_foreign_new):
+ Fix typo that caused us to always return the system
+ colormap.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_colormap_new): When allocating
+ a private colormap and copying the system palette
+ to prevent flashing, handle colormap->size greater than
+ system_colormap->size.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_get_xdisplay):
+ Get rid of the last remains of private->xdisplay
+ in favor of using private->screen.
+
2002-12-09 Tor Lillqvist <tml@iki.fi>
Merge from stable:
+Sun Dec 8 20:19:22 2002 Owen Taylor <otaylor@redhat.com>
+
+ Fixes for GdkColormapX11 (#100023, Naofumi Yasufuku)
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_foreign_new):
+ Fix typo that caused us to always return the system
+ colormap.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_colormap_new): When allocating
+ a private colormap and copying the system palette
+ to prevent flashing, handle colormap->size greater than
+ system_colormap->size.
+
+ * gdk/x11/gdkcolor-x11.c (gdk_x11_colormap_get_xdisplay):
+ Get rid of the last remains of private->xdisplay
+ in favor of using private->screen.
+
2002-12-09 Tor Lillqvist <tml@iki.fi>
Merge from stable:
{
GdkScreen *screen;
Colormap xcolormap;
- Display *xdisplay;
gint private_val;
GHashTable *hash;
if (allocate)
{
+ GdkVisual *system_visual;
XColor *default_colors;
+ gint n_default_colors;
+
+ system_visual = gdk_screen_get_system_visual (private->screen);
+ n_default_colors = MIN (system_visual->colormap_size, colormap->size);
default_colors = g_new (XColor, colormap->size);
- for (i = 0; i < colormap->size; i++)
+ for (i = 0; i < n_default_colors; i++)
default_colors[i].pixel = i;
XQueryColors (xdisplay,
DefaultColormapOfScreen (GDK_SCREEN_X11 (private->screen)->xscreen),
- default_colors, colormap->size);
+ default_colors, n_default_colors);
- for (i = 0; i < colormap->size; i++)
+ for (i = 0; i < n_default_colors; i++)
{
colormap->colors[i].pixel = default_colors[i].pixel;
colormap->colors[i].red = default_colors[i].red;
colormap->colors[i].blue = default_colors[i].blue;
}
- gdk_colormap_change (colormap, colormap->size);
+ gdk_colormap_change (colormap, n_default_colors);
g_free (default_colors);
}
screen = gdk_visual_get_screen (visual);
if (xcolormap == DefaultColormap (GDK_SCREEN_XDISPLAY (screen),
- GDK_SCREEN_XNUMBER (screen)));
+ GDK_SCREEN_XNUMBER (screen)))
return g_object_ref (gdk_screen_get_system_colormap (screen));
colormap = gdk_colormap_lookup (screen, xcolormap);
private->screen = screen;
private->xcolormap = xcolormap;
- private->xdisplay = GDK_SCREEN_XDISPLAY (screen);
private->private_val = FALSE;
colormap->size = visual->colormap_size;
private = GDK_COLORMAP_PRIVATE_DATA (colormap);
- return private->xdisplay;
+ return GDK_SCREEN_XDISPLAY (private->screen);
}
/**