diff options
author | Dave Davenport <qball@gmpclient.org> | 2023-12-08 13:51:04 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2023-12-08 13:51:04 +0100 |
commit | d042e20fff6f0dcd3a3d458aba9979e4671642d6 (patch) | |
tree | 6543c22cca99fb3008257261dacff01730c34e40 | |
parent | b43a82f86d0cf30e0c7f6d70fbbaa818a617d0be (diff) |
[View] Allow float delay
fixes: #1926
-rw-r--r-- | source/view.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/view.c b/source/view.c index 6d04503f..0e924c92 100644 --- a/source/view.c +++ b/source/view.c @@ -555,6 +555,13 @@ static void rofi_view_set_user_timeout(G_GNUC_UNUSED gpointer data) { int delay = p->value.i; CacheState.user_timeout = g_timeout_add(delay * 1000, rofi_view_user_timeout, NULL); + } else { + Property *p = rofi_theme_find_property(wid, P_DOUBLE, "delay", TRUE); + if (p != NULL && p->type == P_DOUBLE && p->value.f > 0.01) { + double delay = p->value.f; + CacheState.user_timeout = + g_timeout_add(delay * 1000, rofi_view_user_timeout, NULL); + } } } } |