summaryrefslogtreecommitdiff
path: root/src/user/raleigh/w/entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/raleigh/w/entry.cpp')
-rw-r--r--src/user/raleigh/w/entry.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/user/raleigh/w/entry.cpp b/src/user/raleigh/w/entry.cpp
index 1c6f91e..991d75a 100644
--- a/src/user/raleigh/w/entry.cpp
+++ b/src/user/raleigh/w/entry.cpp
@@ -9,8 +9,7 @@ namespace raleigh {
const char *font, _pixel_t bg, _pixel_t fg, _pixel_t border_color)
: rows(rows), cols(cols), bg(bg), fg(fg), border_color(border_color),
fi(get_font(font)), data(new char[rows * cols]),
- line_indices(new uint32_t[rows + 1]), first_paint(true),
- has_focus(false) {
+ line_indices(new uint32_t[rows + 1]), has_focus(false) {
size = coord(fi->space_width * (cols - 1) + fi->char_width + 6,
fi->space_height * (rows - 1) + fi->char_height + 6);
closest_opaque = this;
@@ -78,7 +77,9 @@ namespace raleigh {
_pixel_t *const cur_ptr = pixbuf + (window_offset.y + 3 + cur_y * fi->space_height) * pitch + (window_offset.x + 3 + cur_x * fi->space_width);
_pixel_t *const old_cur_ptr = pixbuf + (window_offset.y + 3 + cur_y_last_paint * fi->space_height) * pitch + (window_offset.x + 3 + cur_x_last_paint * fi->space_width);
- if (first_paint) {
+ if (next_paint_full) {
+ next_paint_full = false;
+
for (uint32_t x = 0; x < size.x; ++x) {
pixbuf[(window_offset.y) * pitch + window_offset.x + x] = border_color;
pixbuf[(window_offset.y + size.y - 1) * pitch + window_offset.x + x] = border_color;
@@ -93,7 +94,6 @@ namespace raleigh {
pixbuf[(window_offset.y + y) * pitch + (window_offset.x + x)] = bg;
paint_text(pixbuf, pitch);
- first_paint = false;
}
else if (text_changed_since_last_paint) {