NSM: Fix occasional deadlock of session manager GUI when displaying "Command failed with..." message.
Closes #44.
This commit is contained in:
parent
a6a15e2a2d
commit
31c14150e7
|
@ -427,6 +427,17 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static
|
||||||
|
void
|
||||||
|
fl_awake_alert( void *v )
|
||||||
|
{
|
||||||
|
if ( v )
|
||||||
|
{
|
||||||
|
fl_alert( (char*)v);
|
||||||
|
free( v );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
browser_callback ( Fl_Widget *w, void * )
|
browser_callback ( Fl_Widget *w, void * )
|
||||||
{
|
{
|
||||||
|
@ -1016,7 +1027,12 @@ private:
|
||||||
int err = argv[1]->i;
|
int err = argv[1]->i;
|
||||||
|
|
||||||
if ( err != 0 )
|
if ( err != 0 )
|
||||||
fl_alert( "Command %s failed with:\n\n%s", &argv[0]->s, &argv[2]->s );
|
{
|
||||||
|
char *s;
|
||||||
|
asprintf( &s, "Command %s failed with:\n\n%s", &argv[0]->s, &argv[2]->s );
|
||||||
|
|
||||||
|
Fl::awake(fl_awake_alert, s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!strcmp( path, "/reply" ) && argc && 's' == *types )
|
else if (!strcmp( path, "/reply" ) && argc && 's' == *types )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue