Browse Source

NTK: Don't keep unneeded clients in session when switching.

tags/non-daw-v1.2.0
Jonathan Moore Liles 12 years ago
parent
commit
f2bc2b5c9b
1 changed files with 6 additions and 8 deletions
  1. +6
    -8
      session-manager/src/nsmd.C

+ 6
- 8
session-manager/src/nsmd.C View File

@@ -1242,19 +1242,17 @@ load_session_file ( const char * path )
i != client.end();
++i )
{
if ( ! (*i)->is_capable_of( ":switch:" ) )
if ( ! (*i)->is_capable_of( ":switch:" ) || client_map.find((*i)->name ) == client_map.end() )
{
/* client is not capable of switch, or is not wanted in the new session */
command_client_to_quit( *i );
}
else
{
if ( client_map.find((*i)->name ) != client_map.end() )
{
/* client is switch capable and may be wanted in the new session */
if ( client_map[ (*i)->name ]-- <= 0 )
/* nope,, we already have as many as we need, stop this one */
command_client_to_quit( *i );
}
/* client is switch capable and may be wanted in the new session */
if ( client_map[ (*i)->name ]-- <= 0 )
/* nope,, we already have as many as we need, stop this one */
command_client_to_quit( *i );
}
}


Loading…
Cancel
Save