From ef4a993d20ceb791ac62dd219ee7d63524e04a3e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 22 Aug 2023 22:16:19 +0200 Subject: Correct background color --- src/window/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/window/window.c b/src/window/window.c index 0654e85..980e811 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -285,7 +285,7 @@ static void mgl_window_on_resize(mgl_window *self, int width, int height) { static unsigned long mgl_color_to_x11_pixel(mgl_color color) { if(color.a == 0) return 0; - return (color.r << 16) | (color.g << 8) | color.b; + return ((uint32_t)color.a << 24) | ((uint32_t)color.r << 16) | ((uint32_t)color.g << 8) | (uint32_t)color.b; } static int mgl_window_init(mgl_window *self, const char *title, const mgl_window_create_params *params, Window existing_window) { -- cgit v1.2.3