[PATCH weston] window: fix display_acquire_window_surface()

Pekka Paalanen ppaalanen at gmail.com
Wed Feb 20 03:39:17 PST 2013


Make sure that display_acquire_window_surface() creates the Cairo
surface as necessary. Otherwise surface->toysurface can be NULL.

This fixes weston-screensaver fullscreen mode. Demo mode was not
affected as it uses window decorations, and so the Cairo surface is
created. This regression was introduced by:

commit 0c4445ba5756e51007606028bce00b2ecb352bd7
Author: Pekka Paalanen <ppaalanen at gmail.com>
Date:   Wed Feb 13 16:17:23 2013 +0200

    window: create Cairo surfaces on demand for redraw

Reported-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 clients/window.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clients/window.c b/clients/window.c
index 1c5c285..d917550 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -4529,6 +4529,7 @@ display_acquire_window_surface(struct display *display,
 	if (surface->buffer_type != WINDOW_BUFFER_TYPE_EGL_WINDOW)
 		return -1;
 
+	widget_get_cairo_surface(window->main_surface->widget);
 	return surface->toysurface->acquire(surface->toysurface, ctx);
 }
 
-- 
1.7.12.4



More information about the wayland-devel mailing list