Hi,

terminal crashed for me randomly on resizing.
Output from compositor: "failed to create image for name 16"
Output from terminal: "sent request to invalid object"

This patch fixes the issue, terminal runs stable here.

---
 clients/terminal.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/clients/terminal.c b/clients/terminal.c
index d3d7a0b..e8131d1 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -836,13 +836,19 @@ terminal_draw_contents(struct terminal *terminal)
        union utf8_char *p_row;
        union decoded_attr attr;
        int text_x, text_y;
-       cairo_surface_t *surface;
+       cairo_surface_t *wsurface, *surface;
        double d;
        struct glyph_run run;

        window_get_child_allocation(terminal->window, &allocation);

-       surface = display_create_surface(terminal->display, &allocation);
+        wsurface = window_get_surface(terminal->window);
+        surface = cairo_surface_create_similar(wsurface,
+                                               CAIRO_CONTENT_COLOR_ALPHA,
+                                               allocation.width,
+                                               allocation.height);
+        cairo_surface_destroy(wsurface);
+
        cr = cairo_create(surface);
        cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
        terminal_set_color(terminal, cr, terminal->color_scheme->border);
--
1.7.2.3
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to