Move another expensive options test to after a cheaper timer check/update.

This commit is contained in:
Nicholas Marriott 2009-08-18 21:18:20 +00:00
parent fa617467b1
commit 8b7be5861e

View File

@ -42,8 +42,6 @@ set_window_names(void)
w = ARRAY_ITEM(&windows, i); w = ARRAY_ITEM(&windows, i);
if (w == NULL || w->active == NULL) if (w == NULL || w->active == NULL)
continue; continue;
if (!options_get_number(&w->options, "automatic-rename"))
continue;
if (timercmp(&tv, &w->name_timer, <)) if (timercmp(&tv, &w->name_timer, <))
continue; continue;
@ -52,6 +50,9 @@ set_window_names(void)
tv2.tv_usec = NAME_INTERVAL * 1000L; tv2.tv_usec = NAME_INTERVAL * 1000L;
timeradd(&w->name_timer, &tv2, &w->name_timer); timeradd(&w->name_timer, &tv2, &w->name_timer);
if (!options_get_number(&w->options, "automatic-rename"))
continue;
if (w->active->screen != &w->active->base) if (w->active->screen != &w->active->base)
name = NULL; name = NULL;
else else