Skip to content

Commit

Permalink
[View] Allow float delay
Browse files Browse the repository at this point in the history
fixes: #1926
  • Loading branch information
DaveDavenport committed Dec 8, 2023
1 parent b43a82f commit d042e20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit d042e20

Please sign in to comment.