Remove len field from ViewStack

This is misleading as unmapped views should be ignored
This commit is contained in:
Isaac Freund
2020-04-04 16:26:13 +02:00
parent 6c8e7c14f7
commit 424a16fe94
2 changed files with 9 additions and 24 deletions

View File

@ -119,16 +119,16 @@ pub const Server = struct {
if (modifiers & @intCast(u32, c.WLR_MODIFIER_SHIFT) != 0) {
switch (sym) {
c.XKB_KEY_H => {
if (self.root.master_count < self.root.views.len) {
self.root.master_count += 1;
self.root.arrange();
}
//if (self.root.master_count < self.root.views.len) {
self.root.master_count += 1;
self.root.arrange();
//}
},
c.XKB_KEY_L => {
if (self.root.master_count > 0) {
self.root.master_count -= 1;
self.root.arrange();
}
//if (self.root.master_count > 0) {
self.root.master_count -= 1;
self.root.arrange();
//}
},
c.XKB_KEY_Return => {
// Spawn an instance of alacritty