summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2021-06-15 14:04:34 +0200
committerDave Davenport <qball@blame.services>2021-06-15 14:04:34 +0200
commit3307d62c55b2f359c52bc9884b0472f9eae9aa47 (patch)
tree78438d8658667ff163159f539e620d3b9987a217 /source
parentb541bf55bc50786d12a3f7fefa0f8b92e5673a5e (diff)
[Doc] Add new -display-{mode} method to manpage.
Diffstat (limited to 'source')
-rw-r--r--source/mode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/mode.c b/source/mode.c
index 8c0a9fc0..ae4b23be 100644
--- a/source/mode.c
+++ b/source/mode.c
@@ -153,10 +153,12 @@ void mode_set_private_data ( Mode *mode, void *pd )
const char *mode_get_display_name ( const Mode *mode )
{
+ /** Find the widget */
ThemeWidget *wid = rofi_config_find_widget ( mode->name, NULL, TRUE );
if ( wid ) {
+ /** Check string property */
Property *p = rofi_theme_find_property ( wid, P_STRING, "display-name", FALSE );
- if ( p != NULL ) {
+ if ( p != NULL && p->type == P_STRING ) {
return p->value.s;
}
}