From 5647eeecf32f8b3ae6a73c06c96107cbb13b297f Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 24 Apr 1998 01:03:32 +0000 Subject: merging changes from owen: Wed Apr 15 20:42:46 1998 Owen Taylor * 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) -r HEAD and -r gtk-1-0 are in sync now! --- gtk/gtkpreview.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gtk') diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c index b648acabc1..6172f3ecb9 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: -- cgit v1.2.1