output: factor out output_set_has_fullscreen_view()

This commit is contained in:
John Lindgren 2025-11-08 09:40:26 -05:00 committed by Consolatis
parent 6de18b9afd
commit 87da3f6588
4 changed files with 25 additions and 23 deletions

View file

@ -1144,3 +1144,15 @@ output_enable_adaptive_sync(struct output *output, bool enabled)
enabled ? "en" : "dis", output->wlr_output->name);
}
}
void
output_set_has_fullscreen_view(struct output *output, bool has_fullscreen_view)
{
if (rc.adaptive_sync != LAB_ADAPTIVE_SYNC_FULLSCREEN
|| !output_is_usable(output)) {
return;
}
/* Enable adaptive sync if view is fullscreen */
output_enable_adaptive_sync(output, has_fullscreen_view);
output_state_commit(output);
}