summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Vrac <avrac@freebox.fr>2014-08-25 20:56:49 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-08-28 13:41:00 +0300
commitfb754a0a0544a49617b8d83a702746702349fe07 (patch)
treed4f2d1b02b2f28be047574dca8f752f382ee82d9
parent488b7cd0f028a4a2371fd56cbd8cc69dc9b99317 (diff)
downloadweston-fb754a0a0544a49617b8d83a702746702349fe07.tar.gz
desktop-shell: properly set background widget as opaque
Toytoolkit resets the opaque region which was set manually using the wayland protocol directly, so use the widget API instead. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--clients/desktop-shell.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index db4a1fd7..961a9b24 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -695,8 +695,6 @@ background_draw(struct widget *widget, void *data)
double sx, sy, s;
double tx, ty;
struct rectangle allocation;
- struct display *display;
- struct wl_region *opaque;
surface = window_get_surface(background->window);
@@ -752,13 +750,6 @@ background_draw(struct widget *widget, void *data)
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);
-
background->painted = 1;
check_desktop_ready(background->window);
}
@@ -1056,6 +1047,7 @@ background_create(struct desktop *desktop)
background->widget = window_add_widget(background->window, background);
window_set_user_data(background->window, background);
widget_set_redraw_handler(background->widget, background_draw);
+ widget_set_transparent(background->widget, 0);
window_set_preferred_format(background->window,
WINDOW_PREFERRED_FORMAT_RGB565);