diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-26 16:49:50 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-26 16:49:50 +0200 |
| commit | 550bd493cdb4696069f23b00616b86daa348a89a (patch) | |
| tree | 82cc411690443ee0f1b061d48cb0195e5ec233e9 /src/xdg_toplevel.zig | |
| parent | 21c3969c5fe23e3defefe89942c27d553af2bce7 (diff) | |
| download | river-550bd493cdb4696069f23b00616b86daa348a89a.tar.gz river-550bd493cdb4696069f23b00616b86daa348a89a.tar.xz | |
Greatly simplify view offset handling
Fixes https://github.com/ifreund/river/issues/9
Diffstat (limited to 'src/xdg_toplevel.zig')
| -rw-r--r-- | src/xdg_toplevel.zig | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/xdg_toplevel.zig b/src/xdg_toplevel.zig index 4e7115a..0e64396 100644 --- a/src/xdg_toplevel.zig +++ b/src/xdg_toplevel.zig @@ -3,7 +3,7 @@ const Self = @This(); const c = @import("c.zig"); const std = @import("std"); -const Box = @import("box.zig").Box; +const Box = @import("box.zig"); const Log = @import("log.zig").Log; const View = @import("view.zig").View; const ViewStack = @import("view_stack.zig").ViewStack; @@ -44,12 +44,10 @@ pub fn init(self: *Self, view: *View, wlr_xdg_surface: *c.wlr_xdg_surface) void } pub fn configure(self: Self, pending_box: Box) void { - const border_width = self.view.output.root.server.config.border_width; - const view_padding = self.view.output.root.server.config.view_padding; self.view.pending_serial = c.wlr_xdg_toplevel_set_size( self.wlr_xdg_surface, - pending_box.width - border_width * 2 - view_padding * 2, - pending_box.height - border_width * 2 - view_padding * 2, + pending_box.width, + pending_box.height, ); } |
