summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-12-18 12:08:19 -0500
committerKristian Høgsberg <krh@redhat.com>2008-12-18 12:10:37 -0500
commit5b7f832eabba6b9fa04a5b433a7fd77abeba7165 (patch)
tree549da42b5b56dd61d8aac0568951997130e956a6
parentd2412e2c2ea463189550d5f7a5d95a7aab13a502 (diff)
Fall back to solid color background if not image is found.
-rw-r--r--egl-compositor.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/egl-compositor.c b/egl-compositor.c
index 2cf9ec1..ef05235 100644
--- a/egl-compositor.c
+++ b/egl-compositor.c
@@ -481,7 +481,10 @@ repaint(void *data)
return;
}
- draw_surface(ec->background);
+ if (ec->background)
+ draw_surface(ec->background);
+ else
+ glClear(GL_COLOR_BUFFER_BIT);
es = container_of(ec->surface_list.next,
struct egl_surface, link);
@@ -1027,6 +1030,7 @@ egl_compositor_create(struct wl_display *display)
glLoadIdentity();
glOrtho(0, ec->width, ec->height, 0, 0, 1000.0);
glMatrixMode(GL_MODELVIEW);
+ glClearColor(0, 0, 0.2, 1);
wl_display_set_compositor(display, &ec->base, &compositor_interface);