Fix crashing bug for window size smaller than 2 * (border width + gap size)
This commit is contained in:
parent
e66c8b0019
commit
45a730cbd3
1 changed files with 4 additions and 2 deletions
|
@ -269,8 +269,10 @@ fn layoutExternal(self: *Self, visible_count: u32) !void {
|
|||
var box = try parseBox(token);
|
||||
box.x += self.usable_box.x + xy_offset;
|
||||
box.y += self.usable_box.y + xy_offset;
|
||||
box.width -= delta_size;
|
||||
box.height -= delta_size;
|
||||
|
||||
if (box.width > delta_size) box.width -= delta_size;
|
||||
if (box.height > delta_size) box.height -= delta_size;
|
||||
|
||||
try view_boxen.append(box);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue