aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-07-19 13:18:04 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-07-22 23:10:19 +1000
commitf9491c9584d2c1fb789eee9c9e21fd6c274f4579 (patch)
tree4ea53dab5ca139ddd216a579b41e8fea0e2cd4e5 /sway
parent2c6616050a924a356b9bebbe16c9c7b8661b5d80 (diff)
Fix damage issue when moving and resizing
Diffstat (limited to 'sway')
-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,
void output_damage_whole_container(struct sway_output *output,
struct sway_container *con) {
+ // Pad the box by 1px, because the width is a double and might be a fraction
struct wlr_box box = {
- .x = con->current.swayc_x - output->wlr_output->lx,
- .y = con->current.swayc_y - output->wlr_output->ly,
- .width = con->current.swayc_width,
- .height = con->current.swayc_height,
+ .x = con->current.swayc_x - output->wlr_output->lx - 1,
+ .y = con->current.swayc_y - output->wlr_output->ly - 1,
+ .width = con->current.swayc_width + 2,
+ .height = con->current.swayc_height + 2,
};
scale_box(&box, output->wlr_output->scale);
wlr_output_damage_add_box(output->damage, &box);