diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-12-29 19:18:00 +0100 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-01-07 22:15:42 +0100 |
| commit | 7249f5c9c3f32462a675fc6888bc4dd5f1e83845 (patch) | |
| tree | fb3ea7984c64119a21c00b2e1475e73499aa7165 | |
| parent | 11e1c4791f76c315d26740e242a7be5bbfe88ffa (diff) | |
| download | river-7249f5c9c3f32462a675fc6888bc4dd5f1e83845.tar.gz river-7249f5c9c3f32462a675fc6888bc4dd5f1e83845.tar.xz | |
xwayland: use layout coords for configures
| -rw-r--r-- | river/XwaylandView.zig | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/river/XwaylandView.zig b/river/XwaylandView.zig index dea66e2..76af934 100644 --- a/river/XwaylandView.zig +++ b/river/XwaylandView.zig @@ -63,8 +63,10 @@ pub fn deinit(self: *Self) void { } pub fn needsConfigure(self: Self) bool { - return self.xwayland_surface.x != self.view.pending.box.x or - self.xwayland_surface.y != self.view.pending.box.y or + const output = self.view.output; + const output_box = output.root.output_layout.getBox(output.wlr_output).?; + return self.xwayland_surface.x != self.view.pending.box.x + output_box.x or + self.xwayland_surface.y != self.view.pending.box.y + output_box.y or self.xwayland_surface.width != self.view.pending.box.width or self.xwayland_surface.height != self.view.pending.box.height; } @@ -72,11 +74,14 @@ pub fn needsConfigure(self: Self) bool { /// Apply pending state. Note: we don't set View.serial as /// shouldTrackConfigure() is always false for xwayland views. pub fn configure(self: Self) void { + const output = self.view.output; + const output_box = output.root.output_layout.getBox(output.wlr_output).?; + const state = &self.view.pending; self.xwayland_surface.setFullscreen(state.fullscreen); self.xwayland_surface.configure( - @intCast(i16, state.box.x), - @intCast(i16, state.box.y), + @intCast(i16, state.box.x + output_box.x), + @intCast(i16, state.box.y + output_box.y), @intCast(u16, state.box.width), @intCast(u16, state.box.height), ); |
