render: damage on background/border color change

This commit is contained in:
Isaac Freund 2021-06-16 17:42:09 +00:00
parent 3405e2a87c
commit 5daec347c0
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -46,6 +46,9 @@ pub fn backgroundColor(
if (args.len > 2) return Error.TooManyArguments;
server.config.background_color = try parseRgba(args[1]);
var it = server.root.outputs.first;
while (it) |node| : (it = node.next) node.data.damage.addWhole();
}
pub fn borderColorFocused(
@ -58,6 +61,9 @@ pub fn borderColorFocused(
if (args.len > 2) return Error.TooManyArguments;
server.config.border_color_focused = try parseRgba(args[1]);
var it = server.root.outputs.first;
while (it) |node| : (it = node.next) node.data.damage.addWhole();
}
pub fn borderColorUnfocused(
@ -70,6 +76,9 @@ pub fn borderColorUnfocused(
if (args.len > 2) return Error.TooManyArguments;
server.config.border_color_unfocused = try parseRgba(args[1]);
var it = server.root.outputs.first;
while (it) |node| : (it = node.next) node.data.damage.addWhole();
}
/// Parse a color in the format #RRGGBB or #RRGGBBAA