c/multi: Do not draw apps that are not visible

Closes #197
This commit is contained in:
Jakob Bornecrantz 2022-09-08 21:04:46 +01:00 committed by Ryan Pavlik
parent c6aa252796
commit 43526f48b7

View file

@ -262,6 +262,17 @@ transfer_layers_locked(struct multi_system_compositor *msc, uint64_t display_tim
continue; continue;
} }
// The client isn't visible, do not submit it's layers.
if (!mc->state.visible) {
continue;
}
// Just in case.
if (!mc->state.session_active) {
U_LOG_W("Session is visible but not active.");
continue;
}
uint64_t frame_time_ns = mc->delivered.display_time_ns; uint64_t frame_time_ns = mc->delivered.display_time_ns;
if (!time_is_within_half_ms(frame_time_ns, display_time_ns)) { if (!time_is_within_half_ms(frame_time_ns, display_time_ns)) {
log_frame_time_diff(frame_time_ns, display_time_ns); log_frame_time_diff(frame_time_ns, display_time_ns);