From 259ea27dbc22d8a3dfbb82fb5dac334ad97cedbc Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Thu, 31 May 2012 03:36:36 -0400 Subject: [PATCH] Better transparency implementation. --- termite.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/termite.c b/termite.c index 0455cc6..87b1236 100644 --- a/termite.c +++ b/termite.c @@ -226,10 +226,11 @@ int main(int argc, char **argv) { #ifdef TRANSPARENCY GdkScreen *screen = gtk_widget_get_screen(window); - GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen); - if (colormap != NULL) { - gtk_widget_set_colormap(window, colormap); - } + GdkVisual *visual = gdk_screen_get_rgba_visual(screen); + if (visual == NULL) + visual = gdk_screen_get_system_visual(screen); + + gtk_widget_set_visual(GTK_WIDGET(window), visual); vte_terminal_set_background_saturation(VTE_TERMINAL(vte), TRANSPARENCY); vte_terminal_set_opacity(VTE_TERMINAL(vte), (guint16)(0xffff * (1 - TRANSPARENCY))); #endif