1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

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 ) {
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;
}