Fix detection no theme.

This commit is contained in:
Dave Davenport 2020-03-02 12:21:34 +01:00
parent e8eecae4c4
commit e0e6c5e670
1 changed files with 9 additions and 0 deletions

View File

@ -855,6 +855,15 @@ gboolean rofi_theme_is_empty ( void )
if ( rofi_theme->properties == NULL && rofi_theme->num_widgets == 0 ) {
return TRUE;
}
if ( rofi_theme->num_widgets == 3 ) {
// HACK: check for default added elements.
for ( unsigned int i = 0; i < rofi_theme->num_widgets;i++) {
if ( strncmp ( rofi_theme->widgets[i]->name, "element", 7) != 0 ){
return FALSE;
}
}
return TRUE;
}
return FALSE;
}