From 5647eeecf32f8b3ae6a73c06c96107cbb13b297f Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 24 Apr 1998 01:03:32 +0000 Subject: [PATCH] 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! --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkpreview.c | 12 ++++++++++++ 8 files changed, 68 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6ad0a48248..f064fb9855 100644 --- a/ChangeLog +++ b/ChangeLog @@ -58,6 +58,14 @@ Wed Apr 15 05:13:09 1998 Tim Janik (Damon Chaplin), which i got wrong when applying Damon's patch the last time. +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) + 1998-04-14 Miguel de Icaza * gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 6ad0a48248..f064fb9855 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -58,6 +58,14 @@ Wed Apr 15 05:13:09 1998 Tim Janik (Damon Chaplin), which i got wrong when applying Damon's patch the last time. +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) + 1998-04-14 Miguel de Icaza * gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 6ad0a48248..f064fb9855 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -58,6 +58,14 @@ Wed Apr 15 05:13:09 1998 Tim Janik (Damon Chaplin), which i got wrong when applying Damon's patch the last time. +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) + 1998-04-14 Miguel de Icaza * gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 6ad0a48248..f064fb9855 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -58,6 +58,14 @@ Wed Apr 15 05:13:09 1998 Tim Janik (Damon Chaplin), which i got wrong when applying Damon's patch the last time. +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) + 1998-04-14 Miguel de Icaza * gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 6ad0a48248..f064fb9855 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -58,6 +58,14 @@ Wed Apr 15 05:13:09 1998 Tim Janik (Damon Chaplin), which i got wrong when applying Damon's patch the last time. +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) + 1998-04-14 Miguel de Icaza * gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 6ad0a48248..f064fb9855 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -58,6 +58,14 @@ Wed Apr 15 05:13:09 1998 Tim Janik (Damon Chaplin), which i got wrong when applying Damon's patch the last time. +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) + 1998-04-14 Miguel de Icaza * gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 6ad0a48248..f064fb9855 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -58,6 +58,14 @@ Wed Apr 15 05:13:09 1998 Tim Janik (Damon Chaplin), which i got wrong when applying Damon's patch the last time. +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) + 1998-04-14 Miguel de Icaza * gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced 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: