mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
make sure to fail setting gamma on disabled outputs
This commit is contained in:
parent
aaf490d794
commit
0032954c75
2 changed files with 5 additions and 0 deletions
|
@ -108,6 +108,7 @@ static void gamma_control_handle_set_gamma(struct wl_client *client,
|
|||
wlr_output_set_gamma(gamma_control->output, ramp_size, r, g, b);
|
||||
if (!wlr_output_test(gamma_control->output)) {
|
||||
gamma_control_send_failed(gamma_control);
|
||||
wlr_output_rollback(gamma_control->output);
|
||||
goto error_table;
|
||||
}
|
||||
free(table);
|
||||
|
|
|
@ -551,6 +551,10 @@ static bool output_basic_test(struct wlr_output *output) {
|
|||
wlr_log(WLR_DEBUG, "Tried to enable adaptive sync on a disabled output");
|
||||
return false;
|
||||
}
|
||||
if (!enabled && output->pending.committed & WLR_OUTPUT_STATE_GAMMA_LUT) {
|
||||
wlr_log(WLR_DEBUG, "Tried to set the gamma lut on a disabled output");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue