Browse Source

Mixer: Avoid operations that would attempt to open the X display when running in noui mode.

Closes #104
tags/non-daw-v1.2.0
Jonathan Moore Liles 10 years ago
parent
commit
5d5b22afd4
3 changed files with 18 additions and 1 deletions
  1. +7
    -0
      mixer/src/JACK_Module.C
  2. +9
    -1
      mixer/src/Spatialization_Console.C
  3. +2
    -0
      mixer/src/main.C

+ 7
- 0
mixer/src/JACK_Module.C View File

@@ -292,6 +292,13 @@ get_connections_for_ports ( std::vector<Module::Port> ports )
void
JACK_Module::update_connection_status ( void )
{
/* do nothing when running in noui mode, as ->add will call some
* font measurement stuff which attempts to open the X display. */
if ( ! fl_display )
{
return;
}

std::list<std::string> output_names = get_connections_for_ports( aux_audio_output );
std::list<std::string> input_names = get_connections_for_ports( aux_audio_input );



+ 9
- 1
mixer/src/Spatialization_Console.C View File

@@ -45,11 +45,14 @@ Spatialization_Console::Spatialization_Console ( void ) : Fl_Double_Window( 850,
label( "Spatialization Console" );

fl_font( FL_HELVETICA, 14 );
labelfont( FL_HELVETICA );
labelsize( 14 );

int padding = 48;
int S = 802;
if ( fl_display )
/* don't open the display in noui mode... */
{
int sx, sy, sw, sh;
@@ -108,7 +111,12 @@ Spatialization_Console::set ( Log_Entry &e )
else if ( ! ( strcmp( s, ":shown" ) ) )
{
if ( atoi( v ) )
{
if ( fl_display )
{
show();
}
}
else
hide();
}


+ 2
- 0
mixer/src/main.C View File

@@ -131,6 +131,8 @@ main ( int argc, char **argv )
{
bool no_ui = false;

fl_display = 0;

printf( "%s %s %s -- %s\n", APP_TITLE, VERSION, "", COPYRIGHT );

Thread::init();


Loading…
Cancel
Save