diff options
| author | alex <alex@echocluster.net> | 2023-01-05 19:25:31 +0100 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2023-01-06 15:19:43 +0100 |
| commit | 86ac0ffd0b9b3e67a86e6518af9c645af8bbcf7c (patch) | |
| tree | 317901c1bd0481baebd8c472a07a1d4d97fa73d3 | |
| parent | e49db7682c982f92d5f780e01f5fd4c952d8112f (diff) | |
| download | river-86ac0ffd0b9b3e67a86e6518af9c645af8bbcf7c.tar.gz river-86ac0ffd0b9b3e67a86e6518af9c645af8bbcf7c.tar.xz | |
river: fix bug in snap down / right
The calculation of view.pending.box.x for snap right should be based on
output_width (not output_height).
The inverse applies to view.pending.box.y for snap down.
| -rw-r--r-- | river/command/move.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/river/command/move.zig b/river/command/move.zig index 5351067..6f22972 100644 --- a/river/command/move.zig +++ b/river/command/move.zig @@ -66,9 +66,9 @@ pub fn snap( view.output.wlr_output.effectiveResolution(&output_width, &output_height); switch (direction) { .up => view.pending.box.y = border_width, - .down => view.pending.box.y = output_width - view.pending.box.height - border_width, + .down => view.pending.box.y = output_height - view.pending.box.height - border_width, .left => view.pending.box.x = border_width, - .right => view.pending.box.x = output_height - view.pending.box.width - border_width, + .right => view.pending.box.x = output_width - view.pending.box.width - border_width, } apply(view); |
