1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

(trunk gtk) #3635 "transient children of the main window aren't hidden when the main window is hidden to the notification area" -- fixed in trunk for 2.11.

This commit is contained in:
Charles Kerr 2010-10-15 23:23:57 +00:00
parent 47fac6bc97
commit d908c7fc9e
2 changed files with 17 additions and 2 deletions

View file

@ -821,14 +821,14 @@ toggleMainWindow( struct cbdata * cbdata )
cbdata->isIconified = 0;
gtk_window_set_skip_taskbar_hint( window, FALSE );
gtk_window_move( window, x, y );
gtk_widget_show( GTK_WIDGET( window ) );
gtr_widget_set_visible( GTK_WIDGET( window ), TRUE );
tr_window_present( window );
}
else
{
gtk_window_get_position( window, &x, &y );
gtk_window_set_skip_taskbar_hint( window, TRUE );
gtk_widget_hide( GTK_WIDGET( window ) );
gtr_widget_set_visible( GTK_WIDGET( window ), FALSE );
cbdata->isIconified = 1;
}
}

View file

@ -729,6 +729,21 @@ gtr_widget_get_realized( GtkWidget * w )
void
gtr_widget_set_visible( GtkWidget * w, gboolean b )
{
/* toggle the transient children, too */
if( GTK_IS_WINDOW( w ) )
{
GList * l;
GList * windows = gtk_window_list_toplevels( );
GtkWindow * window = GTK_WINDOW( w );
for( l=windows; l!=NULL; l=l->next )
if( GTK_IS_WINDOW( l->data ) )
if( gtk_window_get_transient_for( GTK_WINDOW( l->data ) ) == window )
gtr_widget_set_visible( GTK_WIDGET( l->data ), b );
g_list_free( windows );
}
#if GTK_CHECK_VERSION( 2,18,0 )
gtk_widget_set_visible( w, b );
#else