[PATCH weston 4/6] desktop-shell: background should be opaque
Pekka Paalanen
ppaalanen at gmail.com
Tue Oct 23 23:43:08 PDT 2012
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 at gmail.com>
---
clients/desktop-shell.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
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 @@ background_draw(struct widget *widget, void *data)
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 @@ background_draw(struct widget *widget, void *data)
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
--
1.7.8.6
More information about the wayland-devel
mailing list