View: move borders state to State struct

This state affects rendering, so it should pass through the transaction
system like the rest.
This commit is contained in:
Isaac Freund
2023-03-01 16:12:27 +01:00
parent c1c72e23a3
commit 50513390ce
5 changed files with 9 additions and 10 deletions

View File

@ -126,12 +126,12 @@ fn csdFilterUpdateViews(kind: FilterKind, pattern: []const u8, operation: enum {
switch (operation) {
.add => {
_ = xdg_toplevel_decoration.setMode(.client_side);
view.draw_borders = false;
view.pending.borders = false;
_ = toplevel.setTiled(.{ .top = false, .bottom = false, .left = false, .right = false });
},
.remove => {
_ = xdg_toplevel_decoration.setMode(.server_side);
view.draw_borders = true;
view.pending.borders = true;
_ = toplevel.setTiled(.{ .top = true, .bottom = true, .left = true, .right = true });
},
}