Skip to content
Myr

main: don't render immediately in application mode

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Assumption: software rendering is slow, and loading the .desktop files is fast. I.e. we don't want to waste resources rendering an empty window - it's better to finish loading the applications and _then_ render.

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 988fac2 · Browse files · 1 file+17 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+17 added−4 removed

  • other:+17 added−4 removed

1 file+17 added−4 removed

modified:main.c+17 added-4 removed
2257 unmodified lines
2258 }22592260 join_app_thread = true;22612262 if (!conf.dmenu.exit_immediately_if_empty &&2263 !(conf.dmenu.enabled && conf.minimal_lines))2264 {2265 wayl_ready_to_display(wayl);2262 /*2263 * Render immediately, even if empty2264 *2265 * We do this in dmenu mode only; we assume there's at least one2266 * .desktop file in application mode, and we don't want to waste2267 * resources on rendering an empty window while loading the2268 * applications.2269 *2270 * Even if we're in dmenu mode, we don't always render immediately2271 * - exit-immediately-if-empty: we don't want to display anything2272 * if the final list is empty2273 * - minimal-lines: we need to know how many items we're going to2274 * display2275 */2276 if (conf.dmenu.enabled) {2277 if (!conf.dmenu.exit_immediately_if_empty && !conf.minimal_lines)2278 wayl_ready_to_display(wayl);2279 }22802281 wayl_refresh(wayl);2282
69 unmodified lines