[PATCH] Tentative solution of #448, #449
Hi, I've got a problem with 8 bit depth visuals (the images have the wrong palette). This is similar to bug #449 of your bug tracking database (thus I tentatively offered to fix it. Tentative patch is below. Besides, this looks very much like bug #448, so this might be related. I call the patch ``tentative'' because (a) I don't really know 100% what I'm doing here (b) I haven't tested this on other color depths yet. Nevertheless images show correctly now; the price I pay for this is Technicolor. Regards -- tomas ------------------------------------------------- diff -Naur dillo-0.7.3/src/dillo.c dillo-0.7.3-color/src/dillo.c --- dillo-0.7.3/src/dillo.c Tue Jul 22 22:51:22 2003 +++ dillo-0.7.3-color/src/dillo.c Fri Aug 8 19:01:32 2003 @@ -245,6 +245,9 @@ signal(SIGCHLD, Dillo_sigchld_handler); + gtk_widget_push_visual(gdk_rgb_get_visual()); + gtk_widget_push_colormap(gdk_rgb_get_cmap()); + /* check that ~/.dillo exists, create it if it doesn't */ dir = a_Misc_prepend_user_home(".dillo"); Dillo_check_home_dir(dir); @@ -304,6 +307,9 @@ a_Prefs_freeall(); a_Dw_freeall(); a_History_free(); + + gtk_widget_pop_colormap(); + gtk_widget_pop_visual(); g_print("Dillo: normal exit!\n"); return 0;
Thomas, On Fri, 8 Aug 2003 tomas@fabula.de wrote:
Hi,
I've got a problem with 8 bit depth visuals (the images have the wrong palette). This is similar to bug #449 of your bug tracking database (thus I tentatively offered to fix it. Tentative patch is below.
Yes, we've received reports of the same problem before.
Besides, this looks very much like bug #448, so this might be related.
I call the patch ``tentative'' because
(a) I don't really know 100% what I'm doing here
(b) I haven't tested this on other color depths yet.
Nevertheless images show correctly now; the price I pay for this is Technicolor.
The fact of dillo working perfectly without the explicit visual and colormap push in a wide variety of platforms, and it not being documented in the GTK+ docs, makes me at least suspect the bug may be elsewhere. Anyway, if you (or someone else) can ask to the gtk+ mailing list about whether this is required, it'd be great. Don't be shy, they've answered us in the past! :-) Ah, don't forget to point that we're using GTK+ 1.2.x. Cheers Jorge.- PS: Sorry for the late answer.
-------------------------------------------------
diff -Naur dillo-0.7.3/src/dillo.c dillo-0.7.3-color/src/dillo.c --- dillo-0.7.3/src/dillo.c Tue Jul 22 22:51:22 2003 +++ dillo-0.7.3-color/src/dillo.c Fri Aug 8 19:01:32 2003 @@ -245,6 +245,9 @@ signal(SIGCHLD, Dillo_sigchld_handler);
+ gtk_widget_push_visual(gdk_rgb_get_visual()); + gtk_widget_push_colormap(gdk_rgb_get_cmap()); + /* check that ~/.dillo exists, create it if it doesn't */ dir = a_Misc_prepend_user_home(".dillo"); Dillo_check_home_dir(dir); @@ -304,6 +307,9 @@ a_Prefs_freeall(); a_Dw_freeall(); a_History_free(); + + gtk_widget_pop_colormap(); + gtk_widget_pop_visual();
g_print("Dillo: normal exit!\n"); return 0;
participants (2)
-
Jorge Arellano Cid
-
tomas@fabula.de