mirror of
https://github.com/labwc/labwc.git
synced 2026-02-20 01:40:22 -05:00
output: factor out output_set_has_fullscreen_view()
This commit is contained in:
parent
6de18b9afd
commit
87da3f6588
4 changed files with 25 additions and 23 deletions
12
src/output.c
12
src/output.c
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue