mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
output: fix assert() fail when enabling an output that was disabled
When the output is in the process of being enabled, but the new state
has not been committed yet, wlr_output->enabled is still false. So it's
not safe to assert that it's true in output_enable_adaptive_sync().
Fixes: 36e099fc93
"view: ensure output is usable before setting adaptive sync"
This commit is contained in:
parent
296b28d008
commit
da1f28f3dd
1 changed files with 0 additions and 2 deletions
|
|
@ -1048,8 +1048,6 @@ handle_output_power_manager_set_mode(struct wl_listener *listener, void *data)
|
||||||
void
|
void
|
||||||
output_enable_adaptive_sync(struct output *output, bool enabled)
|
output_enable_adaptive_sync(struct output *output, bool enabled)
|
||||||
{
|
{
|
||||||
assert(output_is_usable(output));
|
|
||||||
|
|
||||||
wlr_output_state_set_adaptive_sync_enabled(&output->pending, enabled);
|
wlr_output_state_set_adaptive_sync_enabled(&output->pending, enabled);
|
||||||
if (!wlr_output_test_state(output->wlr_output, &output->pending)) {
|
if (!wlr_output_test_state(output->wlr_output, &output->pending)) {
|
||||||
wlr_output_state_set_adaptive_sync_enabled(&output->pending, false);
|
wlr_output_state_set_adaptive_sync_enabled(&output->pending, false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue