view: draw borders around actual dimensions
Previously if the view did not take the size requested, we would draw the borders around the size we asked the view to take rather than its actual size.
This commit is contained in:
@ -264,6 +264,16 @@ 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;
|
||||
|
Reference in New Issue
Block a user