aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-19 13:18:04 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-22 23:10:19 +1000
commitf9491c9584d2c1fb789eee9c9e21fd6c274f4579 (patch)
tree4ea53dab5ca139ddd216a579b41e8fea0e2cd4e5 /sway/desktop/output.c
parentMake mod + resize do it from the top left corner (diff)
downloadsway-f9491c9584d2c1fb789eee9c9e21fd6c274f4579.tar.gz
sway-f9491c9584d2c1fb789eee9c9e21fd6c274f4579.tar.zst
sway-f9491c9584d2c1fb789eee9c9e21fd6c274f4579.zip
Fix damage issue when moving and resizing
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index a9808406..a206ac6b 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -463,11 +463,12 @@ static void output_damage_whole_container_iterator(struct sway_container *con,
463 463
464void output_damage_whole_container(struct sway_output *output, 464void output_damage_whole_container(struct sway_output *output,
465 struct sway_container *con) { 465 struct sway_container *con) {
466 // Pad the box by 1px, because the width is a double and might be a fraction
466 struct wlr_box box = { 467 struct wlr_box box = {
467 .x = con->current.swayc_x - output->wlr_output->lx, 468 .x = con->current.swayc_x - output->wlr_output->lx - 1,
468 .y = con->current.swayc_y - output->wlr_output->ly, 469 .y = con->current.swayc_y - output->wlr_output->ly - 1,
469 .width = con->current.swayc_width, 470 .width = con->current.swayc_width + 2,
470 .height = con->current.swayc_height, 471 .height = con->current.swayc_height + 2,
471 }; 472 };
472 scale_box(&box, output->wlr_output->scale); 473 scale_box(&box, output->wlr_output->scale);
473 wlr_output_damage_add_box(output->damage, &box); 474 wlr_output_damage_add_box(output->damage, &box);