(gtk) add transparency support for gtk 2.10 and higher

This commit is contained in:
Charles Kerr 2008-02-27 18:33:17 +00:00
parent 8e8ef70856
commit d8cc78dfa1
1 changed files with 9 additions and 0 deletions

View File

@ -451,6 +451,15 @@ tr_window_new( GtkUIManager * ui_manager, TrCore * core )
gtk_ui_manager_get_accel_group (ui_manager));
g_signal_connect( self, "realize", G_CALLBACK(realized_cb), NULL);
#ifdef GTK_CHECK_VERSION(2,10,0)
{
GdkScreen * screen = gtk_widget_get_screen( self );
GdkColormap * colormap = gdk_screen_get_rgba_colormap( screen );
if( colormap && gdk_screen_is_composited( screen ) )
gtk_widget_set_default_colormap( colormap );
}
#endif
/* window's main container */
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER(self), vbox);