aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-08-22 22:16:19 +0200
committerdec05eba <dec05eba@protonmail.com>2023-08-22 22:16:19 +0200
commitef4a993d20ceb791ac62dd219ee7d63524e04a3e (patch)
tree702abdb22a1200d074d7407ef6335f1cb49cb12e /src
parent15cb00dfffd777e97abf8732f84a3c3c3bd659e9 (diff)
Correct background color
Diffstat (limited to 'src')
-rw-r--r--src/window/window.c2
1 files changed, 1 insertions, 1 deletions
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) {