From 4a7d3558988b4c392e253985f4da28bf52fcf488 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 16 Apr 1998 01:01:04 +0000 Subject: [PATCH] Make sure that when we are running with a non-installed colormap, in 8-bit 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) * 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) --- ChangeLog | 13 +++++++++++++ ChangeLog.pre-2-0 | 13 +++++++++++++ ChangeLog.pre-2-10 | 13 +++++++++++++ ChangeLog.pre-2-2 | 13 +++++++++++++ ChangeLog.pre-2-4 | 13 +++++++++++++ ChangeLog.pre-2-6 | 13 +++++++++++++ ChangeLog.pre-2-8 | 13 +++++++++++++ gdk/Makefile.am | 2 -- gtk/gtkpreview.c | 12 ++++++++++++ 9 files changed, 103 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb9899ccae..c3dabf27f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +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) + + * 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) + 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 eb9899ccae..c3dabf27f1 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,16 @@ +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) + + * 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) + 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 eb9899ccae..c3dabf27f1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,16 @@ +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) + + * 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) + 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 eb9899ccae..c3dabf27f1 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,16 @@ +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) + + * 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) + 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 eb9899ccae..c3dabf27f1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,16 @@ +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) + + * 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) + 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 eb9899ccae..c3dabf27f1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,16 @@ +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) + + * 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) + 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 eb9899ccae..c3dabf27f1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,16 @@ +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) + + * 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) + 1998-04-14 Miguel de Icaza * gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced diff --git a/gdk/Makefile.am b/gdk/Makefile.am index 1013fc2346..1530d0e686 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -78,5 +78,3 @@ files: @files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \ echo $$p; \ done - -$(DEP_FILES) : $(BUILT_SOURCES) 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: