Mixer: Avoid operations that would attempt to open the X display when running in noui mode.
Closes #104
This commit is contained in:
parent
13c3ca8eb8
commit
5d5b22afd4
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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…
Reference in New Issue