From 8ef3ce5c6753bcc91dacac2a6d6a8357dc73ea09 Mon Sep 17 00:00:00 2001 From: Tanmay Shah Date: Fri, 16 Oct 2020 06:05:45 +0000 Subject: [PATCH] clients: Fix shell background image setting. If weston.ini is not setting background-image path, then desktop-shell sets ${DATDIR}/weston/pattern.png as background. However in this case width and height is set to 1 during background config and is being scaled to avoid allocation of buffer. This behavior is not right. Along with background-image path, we should also check if background-color is set. If background color is set, then only scale 1x1 buffer. This would allow to set pattern.png as default wallpaper of weston correctly, if background-color is also not set in weston.ini file. Fixes: 3623e46dc555ea9df34ff259530af64f0d9f0645 Signed-off-by: Tanmay Shah --- clients/desktop-shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index bde5dc82..42e7a6cf 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -849,7 +849,7 @@ background_configure(void *data, return; } - if (!background->image) { + if (!background->image && background->color) { widget_set_viewport_destination(background->widget, width, height); width = 1; height = 1;