diff options
author | Owen Taylor <otaylor@gtk.org> | 1998-04-24 01:03:32 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-04-24 01:03:32 +0000 |
commit | 5647eeecf32f8b3ae6a73c06c96107cbb13b297f (patch) | |
tree | dc351a2344f42f7625237703b6c6ef000a8919cc /gtk/gtkpreview.c | |
parent | 3e3c14e9ef27a5156e453accd7906ed4cffd76c7 (diff) | |
download | gtk+-5647eeecf32f8b3ae6a73c06c96107cbb13b297f.tar.gz |
merging changes from owen:
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)
-r HEAD and -r gtk-1-0 are in sync now!
Diffstat (limited to 'gtk/gtkpreview.c')
-rw-r--r-- | gtk/gtkpreview.c | 12 |
1 files changed, 12 insertions, 0 deletions
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: |