mirror of https://github.com/davatorium/rofi.git
Small updates
This commit is contained in:
parent
12886ab0cb
commit
b9d1fe6635
|
@ -2072,6 +2072,7 @@ static void print_global_keybindings ()
|
||||||
static void reload_configuration ()
|
static void reload_configuration ()
|
||||||
{
|
{
|
||||||
if ( find_arg ( "-no-config" ) < 0 ) {
|
if ( find_arg ( "-no-config" ) < 0 ) {
|
||||||
|
TICK ()
|
||||||
// Reset the color cache
|
// Reset the color cache
|
||||||
color_cache_reset ();
|
color_cache_reset ();
|
||||||
// We need to open a new connection to X11, otherwise we get old
|
// We need to open a new connection to X11, otherwise we get old
|
||||||
|
@ -2090,6 +2091,7 @@ static void reload_configuration ()
|
||||||
fprintf ( stderr, "Failed to get a new connection to the X11 server. No point in continuing.\n" );
|
fprintf ( stderr, "Failed to get a new connection to the X11 server. No point in continuing.\n" );
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
TICK_N ( "Load config" )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2372,9 +2374,22 @@ int main ( int argc, char *argv[] )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create thread pool
|
// Create thread pool
|
||||||
tpool = g_thread_pool_new ( call_thread, NULL, config.threads, FALSE, NULL );
|
GError *error = NULL;
|
||||||
|
tpool = g_thread_pool_new ( call_thread, NULL, config.threads, FALSE, &error );
|
||||||
|
if ( error == NULL ) {
|
||||||
|
// Idle threads should stick around for a max of 60 seconds.
|
||||||
g_thread_pool_set_max_idle_time ( 60000 );
|
g_thread_pool_set_max_idle_time ( 60000 );
|
||||||
g_thread_pool_set_max_unused_threads ( config.threads );
|
// We are allowed to have
|
||||||
|
g_thread_pool_set_max_threads ( tpool, config.threads, &error );
|
||||||
|
}
|
||||||
|
// If error occured during setup of pool, tell user and exit.
|
||||||
|
if ( error != NULL ) {
|
||||||
|
char *msg = g_strdup_printf ( "Failed to setup thread pool: '%s'", error->message );
|
||||||
|
show_error_message ( msg, FALSE );
|
||||||
|
g_free ( msg );
|
||||||
|
g_error_free ( error );
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
TICK_N ( "Setup Threadpool" )
|
TICK_N ( "Setup Threadpool" )
|
||||||
// Dmenu mode.
|
// Dmenu mode.
|
||||||
|
@ -2408,8 +2423,7 @@ int main ( int argc, char *argv[] )
|
||||||
else{
|
else{
|
||||||
// Daemon mode, Listen to key presses..
|
// Daemon mode, Listen to key presses..
|
||||||
if ( !grab_global_keybindings () ) {
|
if ( !grab_global_keybindings () ) {
|
||||||
fprintf ( stderr,
|
fprintf ( stderr, "Rofi was launched in daemon mode, but no key-binding was specified.\n" );
|
||||||
"Rofi was launched in daemon mode, but no key-binding was specified.\n" );
|
|
||||||
fprintf ( stderr, "Please check the manpage on how to specify a key-binding.\n" );
|
fprintf ( stderr, "Please check the manpage on how to specify a key-binding.\n" );
|
||||||
fprintf ( stderr, "The following modi are enabled and keys can be specified:\n" );
|
fprintf ( stderr, "The following modi are enabled and keys can be specified:\n" );
|
||||||
for ( unsigned int i = 0; i < num_switchers; i++ ) {
|
for ( unsigned int i = 0; i < num_switchers; i++ ) {
|
||||||
|
|
Loading…
Reference in New Issue