From 6d11a3ce447088bb473b4796b6b306edd714894a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Yao=20Wei=20(=E9=AD=8F=E9=8A=98=E5=BB=B7)?= Date: Tue, 26 Jul 2011 08:49:12 +0800 Subject: [PATCH] solve rgba composite problems. (fixed SF#3376800) --- src/lxterminal.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lxterminal.c b/src/lxterminal.c index 0219d50..bb1a2b2 100644 --- a/src/lxterminal.c +++ b/src/lxterminal.c @@ -1199,9 +1199,16 @@ LXTerminal * lxterminal_initialize(LXTermWindow * lxtermwin, CommandArguments * terminal->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); /* Try to get an RGBA visual (colormap) and assign it to the new window. */ - GdkVisual *visual = gdk_screen_get_rgba_visual(gtk_widget_get_screen(GTK_WIDGET(terminal->window))); - if (visual != NULL) - gtk_widget_set_visual(terminal->window, visual); + #if GTK_CHECK_VERSION (2, 90, 8) + GdkVisual *visual = gdk_screen_get_rgba_visual(gtk_widget_get_screen(GTK_WIDGET(terminal->window))); + if (visual != NULL) + gtk_widget_set_visual(terminal->window, visual); + #else + GdkColormap *colormap = gdk_screen_get_rgba_colormap(gtk_widget_get_screen(GTK_WIDGET(terminal->window))); + if (colormap != NULL) + gtk_widget_set_colormap(terminal->window, colormap); + #endif + /* Set window title. */ gtk_window_set_title(GTK_WINDOW(terminal->window), ((arguments->title != NULL) ? arguments->title : _("LXTerminal"))); -- 1.7.0.1