view: use saved geometry for borders if needed

This fixes the issues caused by 60f06a1 and greatly simplifies the code.
Turns out we were already tracking the dimensions needed.
This commit is contained in:
Isaac Freund
2020-06-28 20:45:17 +02:00
parent 5b96d831d3
commit 82a444a7c0
5 changed files with 3 additions and 34 deletions

View File

@ -262,16 +262,6 @@ pub fn getDefaultFloatBox(self: Self) Box {
};
}
/// Return the dimensions of the actual "visible bounds" that the client has
/// committed. This excludes any "invisible" areas of the surface that show
/// useless stuff like CSD shadows.
pub fn getActualBox(self: Self) Box {
return switch (self.impl) {
.xdg_toplevel => |xdg_toplevel| xdg_toplevel.getActualBox(),
.xwayland_view => |xwayland_view| xwayland_view.getActualBox(),
};
}
/// Called by the impl when the surface is ready to be displayed
pub fn map(self: *Self) void {
const root = self.output.root;