diff --git a/configure.ac b/configure.ac index 4df900d9..a423ab29 100644 --- a/configure.ac +++ b/configure.ac @@ -108,7 +108,7 @@ PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.40 gio-unix-2.0 gmodule-2.0]) GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon >= 0.5.0 xkbcommon-x11 xcb-ewmh xcb-icccm xcb-xrm xcb-randr xcb-xinerama]) PKG_CHECK_MODULES([pango], [pango pangocairo]) PKG_CHECK_MODULES([cairo], [cairo cairo-xcb]) -PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0]) +PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 libprofiler]) dnl --------------------------------------------------------------------- diff --git a/source/rofi.c b/source/rofi.c index c933a742..0f8d285f 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -1025,14 +1025,17 @@ int main ( int argc, char *argv[] ) if ( !dmenu_mode ) { // setup_modi setup_modi (); + TICK_N ( "Setup Modi" ); } if ( find_arg ( "-no-config" ) < 0 ) { // Reload for dynamic part. load_configuration_dynamic ( ); + TICK_N ( "Load config dynamic" ); } // Parse command line for settings, independent of other -no-config. config_parse_cmd_options_dynamic ( ); + TICK_N ( "Load cmd config dynamic" ); if ( config.theme ) { TICK_N ( "Parse theme" ); diff --git a/source/theme.c b/source/theme.c index 7c49a9ae..13d9de44 100644 --- a/source/theme.c +++ b/source/theme.c @@ -314,17 +314,18 @@ static ThemeWidget *rofi_theme_find ( ThemeWidget *widget, const char *name, con if ( widget == NULL || name == NULL ) { return widget; } - char **names = g_strsplit ( name, ".", 0 ); + char *tname = g_strdup(name ); + char *saveptr = NULL; int found = TRUE; - for ( unsigned int i = 0; found && names && names[i]; i++ ) { + for (const char *iter = strtok_r (tname, ".", &saveptr); iter != NULL ; iter = strtok_r ( NULL, "." , &saveptr ) ) { found = FALSE; - ThemeWidget *f = rofi_theme_find_single ( widget, names[i] ); + ThemeWidget *f = rofi_theme_find_single ( widget, iter ); if ( f != widget ) { widget = f; found = TRUE; } } - g_strfreev ( names ); + g_free ( tname ); if ( !exact || found ) { return widget; }