diff options
author | Benji Dial <benji6283@gmail.com> | 2021-02-18 14:57:49 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-02-18 14:57:49 -0500 |
commit | e427f85decc7949487228ec638993ae77fc1ca2c (patch) | |
tree | 145f75e1a8c996b4c2ff9dfae68afcd61e9cfdc4 /src/kernel/window.c | |
parent | 8e120a5c7270fcf4a524dea404c0f2cdcdda3714 (diff) | |
download | portland-os-e427f85decc7949487228ec638993ae77fc1ca2c.tar.gz |
fixing behavior of windows extending off top and left sides of screen
Diffstat (limited to 'src/kernel/window.c')
-rw-r--r-- | src/kernel/window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/window.c b/src/kernel/window.c index 9d3db28..4d700bf 100644 --- a/src/kernel/window.c +++ b/src/kernel/window.c @@ -114,7 +114,7 @@ static void paint_and_above(const struct window *w) { for (uint16_t y = ys; y < ym; ++y) for (uint16_t x = xs; x < xm; ++x) - buffer[(y + i->ypos) * VBE_MODE_INFO->width + x + i->xpos] = i->pixel_buffer_pma[y * i->width + x]; + buffer[((y + i->ypos) & 0xffff) * VBE_MODE_INFO->width + ((x + i->xpos) & 0xffff)] = i->pixel_buffer_pma[y * i->width + x]; draw_hz_line(i->ypos - 2, i->xpos - 2, i->xpos + i->width + 2, BORDER_COLOR); draw_hz_line(i->ypos - 1, i->xpos - 2, i->xpos + i->width + 2, BORDER_COLOR); |