Revert "only set the rgba visual when required"

This reverts commit 4b749020ae.
This commit is contained in:
Daniel Micay 2012-09-18 05:02:00 -04:00
parent 4b749020ae
commit 8f927cad26
1 changed files with 9 additions and 9 deletions

View File

@ -900,15 +900,6 @@ static void load_config(GtkWindow *window, VteTerminal *vte, config_info *info,
} }
if (get_config_double(config, "options", "transparency", &cfgdouble)) { if (get_config_double(config, "options", "transparency", &cfgdouble)) {
if (cfgdouble > 0.0) {
GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(window));
GdkVisual *visual = gdk_screen_get_rgba_visual(screen);
if (!visual) {
visual = gdk_screen_get_system_visual(screen);
}
gtk_widget_set_visual(GTK_WIDGET(window), visual);
}
vte_terminal_set_background_saturation(vte, cfgdouble); vte_terminal_set_background_saturation(vte, cfgdouble);
vte_terminal_set_opacity(vte, (guint16)(0xffff * (1 - cfgdouble))); vte_terminal_set_opacity(vte, (guint16)(0xffff * (1 - cfgdouble)));
} }
@ -1009,6 +1000,15 @@ int main(int argc, char **argv) {
GtkWidget *vte_widget = vte_terminal_new(); GtkWidget *vte_widget = vte_terminal_new();
VteTerminal *vte = VTE_TERMINAL(vte_widget); VteTerminal *vte = VTE_TERMINAL(vte_widget);
#if 0
GdkScreen *screen = gtk_widget_get_screen(window);
GdkVisual *visual = gdk_screen_get_rgba_visual(screen);
if (!visual) {
visual = gdk_screen_get_system_visual(screen);
}
gtk_widget_set_visual(window, visual);
#endif
if (role) { if (role) {
gtk_window_set_role(GTK_WINDOW(window), role); gtk_window_set_role(GTK_WINDOW(window), role);
g_free(role); g_free(role);