From eeb6f1e59f7e523d196085825efe1b27cb085df8 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 24 Sep 2013 11:33:13 +0100 Subject: [PATCH] Do not call actual wl_surface_commit unless we have a buffer attached. NB: Fixes zmike multi-client problem Signed-off-by: Chris Michael --- src/lib/ecore_wayland/ecore_wl_window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 748aa76a20..cd5aabe7ad 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c @@ -196,7 +196,8 @@ ecore_wl_window_commit(Ecore_Wl_Window *win) LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!win) return; - if (win->surface) wl_surface_commit(win->surface); + if ((win->surface) && (win->has_buffer)) + wl_surface_commit(win->surface); } EAPI void @@ -227,6 +228,7 @@ ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, in y = 0; win->edges = 0; + win->has_buffer = (buffer != NULL); /* if (buffer) */ wl_surface_attach(win->surface, buffer, x, y);