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

@ -114,15 +114,6 @@ pub fn getTitle(self: Self) [*:0]const u8 {
return self.wlr_xwayland_surface.title;
}
pub fn getActualBox(self: Self) Box {
return .{
.x = self.wlr_xwayland_surface.x,
.y = self.wlr_xwayland_surface.y,
.width = self.wlr_xwayland_surface.width,
.height = self.wlr_xwayland_surface.height,
};
}
/// Called when the xwayland surface is destroyed
fn handleDestroy(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
const self = @fieldParentPtr(Self, "listen_destroy", listener.?);