Better transparency implementation.
This commit is contained in:
parent
56c1f04cc6
commit
259ea27dbc
|
@ -226,10 +226,11 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
#ifdef TRANSPARENCY
|
#ifdef TRANSPARENCY
|
||||||
GdkScreen *screen = gtk_widget_get_screen(window);
|
GdkScreen *screen = gtk_widget_get_screen(window);
|
||||||
GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen);
|
GdkVisual *visual = gdk_screen_get_rgba_visual(screen);
|
||||||
if (colormap != NULL) {
|
if (visual == NULL)
|
||||||
gtk_widget_set_colormap(window, colormap);
|
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_background_saturation(VTE_TERMINAL(vte), TRANSPARENCY);
|
||||||
vte_terminal_set_opacity(VTE_TERMINAL(vte), (guint16)(0xffff * (1 - TRANSPARENCY)));
|
vte_terminal_set_opacity(VTE_TERMINAL(vte), (guint16)(0xffff * (1 - TRANSPARENCY)));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue