From e0e6c5e67037b27d0a2807f7a20486d52c360ba9 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 2 Mar 2020 12:21:34 +0100 Subject: Fix detection no theme. --- source/theme.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/theme.c b/source/theme.c index 51bb2236..85062f8c 100644 --- a/source/theme.c +++ b/source/theme.c @@ -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; } -- cgit v1.2.3