mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
view: ensure output is usable before setting adaptive sync
Fixes #2337
Backported from
36e099fc93
Slightly modified to remove the additional `assert()`
to keep the code churn to a minimum.
This commit is contained in:
parent
6c05316f55
commit
0e557150f2
1 changed files with 5 additions and 0 deletions
|
|
@ -372,6 +372,11 @@ set_adaptive_sync_fullscreen(struct view *view)
|
||||||
if (rc.adaptive_sync != LAB_ADAPTIVE_SYNC_FULLSCREEN) {
|
if (rc.adaptive_sync != LAB_ADAPTIVE_SYNC_FULLSCREEN) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!output_is_usable(view->output)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Enable adaptive sync if view is fullscreen */
|
/* Enable adaptive sync if view is fullscreen */
|
||||||
output_enable_adaptive_sync(view->output->wlr_output, view->fullscreen);
|
output_enable_adaptive_sync(view->output->wlr_output, view->fullscreen);
|
||||||
wlr_output_commit(view->output->wlr_output);
|
wlr_output_commit(view->output->wlr_output);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue