summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-03-02 12:21:34 +0100
committerDave Davenport <qball@gmpclient.org>2020-03-02 12:21:34 +0100
commite0e6c5e67037b27d0a2807f7a20486d52c360ba9 (patch)
treec941dab392204d34d1d308ced797d096809d28f1
parente8eecae4c4a2478ed56da335b0732f7fb025bc57 (diff)
Fix detection no theme.
-rw-r--r--source/theme.c9
1 files changed, 9 insertions, 0 deletions
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;
}