summaryrefslogtreecommitdiff
path: root/gtk/gtkpreview.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@gtk.org>1998-04-16 01:01:04 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-04-16 01:01:04 +0000
commit4a7d3558988b4c392e253985f4da28bf52fcf488 (patch)
treef3234ce2199f717262b746e64f57e34870928b92 /gtk/gtkpreview.c
parent0982f71b98d32ee2c4ba67a2a02d3d464dcb412f (diff)
downloadgdk-pixbuf-4a7d3558988b4c392e253985f4da28bf52fcf488.tar.gz
Make sure that when we are running with a non-installed colormap, in 8-bit
Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure that when we are running with a non-installed colormap, in 8-bit pseudo-color, we actually are using the system visual. (Fixes *Bad Match* errors on Digital Unix machines with multiple 8-bit pseudo-color visuals) * gdk/Makefile.am: Removed mostly useless dependency that was causing problems for SGI's make, when used with the 'make dist' form of GTK+. (Dependency caused dependencies to be redone when BUILT_SOURCES changed)
Diffstat (limited to 'gtk/gtkpreview.c')
-rw-r--r--gtk/gtkpreview.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c
index b648acabc..6172f3ecb 100644
--- a/gtk/gtkpreview.c
+++ b/gtk/gtkpreview.c
@@ -872,6 +872,18 @@ gtk_preview_get_visuals (GtkPreviewClass *klass)
return;
}
+ /* If we are _not_ running with an installed cmap, we must run
+ * with the system visual. Otherwise, we let GDK pick the visual,
+ * and it makes some effort to pick a non-default visual, which
+ * will hopefully provide minimum color flashing.
+ */
+ if ((klass->info.visual->depth == gdk_visual_get_system()->depth) &&
+ (klass->info.visual->type == gdk_visual_get_system()->type) &&
+ !install_cmap)
+ {
+ klass->info.visual = gdk_visual_get_system();
+ }
+
switch (klass->info.visual->depth)
{
case 8: