desktop-shell: background should be opaque
Toytoolkit does not support setting opaqueness for anything else than
the immediate child widget of the frame widget. Backgrounds do not have
frames, so we need to poke it in manually.
This should allow Weston to paint the background without blending.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 8550cf3..1cae789 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -636,6 +636,8 @@
double sx, sy;
struct rectangle allocation;
int type = -1;
+ struct display *display;
+ struct wl_region *opaque;
surface = window_get_surface(background->window);
@@ -682,6 +684,13 @@
cairo_paint(cr);
cairo_destroy(cr);
cairo_surface_destroy(surface);
+
+ display = window_get_display(background->window);
+ opaque = wl_compositor_create_region(display_get_compositor(display));
+ wl_region_add(opaque, allocation.x, allocation.y,
+ allocation.width, allocation.height);
+ wl_surface_set_opaque_region(window_get_wl_surface(background->window), opaque);
+ wl_region_destroy(opaque);
}
static void