From 264c205add270010cffc549d3073658d186d1151 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 11 Dec 2024 10:03:37 -0600 Subject: [PATCH] desktop-shell: Make backgrounds fully opaque Non-opaque backgrounds don't make sense, and cause rendering problems. Silently set backgrounds fully opaque, and remove any mention of alpha from the man page. Kiosk-shell already implicitly forces opaque backgrounds. Old weston.ini with FF for alpha will always continue to work. Signed-off-by: Derek Foreman --- clients/desktop-shell.c | 3 +++ man/weston.ini.man | 4 ++-- weston.ini.in | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 68d7c2e11..30ffaedae 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -1191,6 +1191,9 @@ background_create(struct desktop *desktop, struct output *output) weston_config_section_get_color(s, "background-color", &background->color, 0x00000000); + /* Backgrounds must be fully opaque. */ + background->color |= 0xFF000000; + weston_config_section_get_string(s, "background-type", &type, "tile"); if (type == NULL) { diff --git a/man/weston.ini.man b/man/weston.ini.man index f50be1f38..70ec330d6 100644 --- a/man/weston.ini.man +++ b/man/weston.ini.man @@ -401,9 +401,9 @@ enough to cover the output, and centers it. The image ends up cropped from left and right, or top and bottom, if the aspect ratio does not match the output. Tile repeats the background image to fill the output. .TP 7 -.BI "background-color=" 0xAARRGGBB +.BI "background-color=" 0xRRGGBB sets the color of the background (unsigned integer). The hexadecimal -digit pairs are in order alpha, red, green, and blue. +digit pairs are in order red, green, and blue. .TP 7 .BI "clock-format=" format sets the panel clock format (string). Can be diff --git a/weston.ini.in b/weston.ini.in index 98caea07e..2da7c3618 100644 --- a/weston.ini.in +++ b/weston.ini.in @@ -7,7 +7,7 @@ [shell] background-image=/usr/share/backgrounds/gnome/Aqua.jpg -background-color=0xff002244 +background-color=0x002244 background-type=tile clock-format=minutes panel-color=0x90ff0000