Browse Source

yutani: missing clip region recalculation in reinit

K. Lange 2 years ago
parent
commit
d2e40a3d0d
1 changed files with 7 additions and 0 deletions
  1. 7 0
      lib/yutani.c

+ 7 - 0
lib/yutani.c

@@ -1092,6 +1092,13 @@ void reinit_graphics_yutani(gfx_context_t * out, yutani_window_t * window) {
 	out->stride = window->width * 4;
 	out->depth  = 32;
 	out->size   = GFX_H(out) * GFX_W(out) * GFX_B(out);
+
+	if (out->clips && out->clips_size != out->height) {
+		free(out->clips);
+		out->clips = NULL;
+		out->clips_size = 0;
+	}
+
 	if (out->buffer == out->backbuffer) {
 		out->buffer = window->buffer;
 		out->backbuffer = out->buffer;