mirror of
https://github.com/swaywm/sway.git
synced 2026-04-25 06:46:24 -04:00
color mgmt: bug fixes
This commit is contained in:
parent
7ec61567c2
commit
47abe18e2c
3 changed files with 9 additions and 6 deletions
|
|
@ -483,9 +483,8 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
|
|||
}
|
||||
|
||||
if(oc) {
|
||||
struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend);
|
||||
wlr_color_config_free(renderer->color);
|
||||
renderer->color = wlr_color_config_copy(oc->color);
|
||||
wlr_color_config_free(wlr_output->color);
|
||||
wlr_output->color = wlr_color_config_copy(oc->color);
|
||||
}
|
||||
|
||||
// Reconfigure all devices, since input config may have been applied before
|
||||
|
|
|
|||
|
|
@ -286,6 +286,10 @@ static void render_view_popups(struct sway_view *view,
|
|||
.damage = damage,
|
||||
.alpha = alpha,
|
||||
};
|
||||
|
||||
// override color config for surface
|
||||
view->surface->color = view->color;
|
||||
|
||||
output_view_for_each_popup(output, view, render_popup_iterator, &data);
|
||||
}
|
||||
|
||||
|
|
@ -1012,6 +1016,7 @@ void output_render(struct sway_output *output, struct timespec *when,
|
|||
}
|
||||
|
||||
wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height);
|
||||
wlr_renderer_color_config(renderer, wlr_output->color);
|
||||
|
||||
if (!pixman_region32_not_empty(damage)) {
|
||||
// Output isn't damaged but needs buffer swap
|
||||
|
|
|
|||
|
|
@ -309,9 +309,8 @@ static void ipc_json_describe_output(struct sway_output *output,
|
|||
|
||||
json_object_object_add(object, "max_render_time", json_object_new_int(output->max_render_time));
|
||||
|
||||
struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend);
|
||||
if(renderer->color) {
|
||||
json_object_object_add(object, "icc_profile", json_object_new_string(renderer->color->icc_profile_path));
|
||||
if(wlr_output->color) {
|
||||
json_object_object_add(object, "icc_profile", json_object_new_string(wlr_output->color->icc_profile_path));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue