Fix detection no theme.

This commit is contained in:
Dave Davenport 2020-03-02 12:21:34 +01:00
parent e8eecae4c4
commit e0e6c5e670

View file

@ -855,6 +855,15 @@ gboolean rofi_theme_is_empty ( void )
if ( rofi_theme->properties == NULL && rofi_theme->num_widgets == 0 ) { if ( rofi_theme->properties == NULL && rofi_theme->num_widgets == 0 ) {
return TRUE; 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; return FALSE;
} }