Skip to content

gamma-wl: Handle get_gamma_control failure

Cameron Nemo requested to merge fix-unsupported-outputs into master

When get_gamma_control is invoked on an output which does not support gamma control (e.g., a headless output), the gamma_control_failed callback gets called (see https://github.com/swaywm/wlroots/blob/bfd020047dbe3d3f1a3734d4fe48f04847a46603/types/wlr_gamma_control_v1.c#L214).

gammastep currently does nothing in this callback, which means that the gamma_size field of the output stays uninitialized. This causes #3 (closed), when the value in memory happens to be a large number.

This patch sets the gamma_size field to 0 in the failure handler, so that unsupported outputs are handled correctly.

Merge request reports

Loading