config: convert tweak.render_timer to an enum

This commit is contained in:
Daniel Eklöf 2022-01-13 12:08:20 +01:00
parent 69ec74a605
commit 891fce6236
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 42 additions and 22 deletions

View file

@ -1495,12 +1495,20 @@ wayl_win_init(struct terminal *term, const char *token)
xdg_activation_v1_activate(wayl->xdg_activation, token, win->surface);
#endif
if (conf->tweak.render_timer_osd) {
switch (conf->tweak.render_timer) {
case RENDER_TIMER_OSD:
case RENDER_TIMER_BOTH:
if (!wayl_win_subsurface_new(win, &win->render_timer)) {
LOG_ERR("failed to create render timer surface");
goto out;
}
break;
case RENDER_TIMER_NONE:
case RENDER_TIMER_LOG:
break;
}
return win;
out: