From 7f25ddc2294f80c0e83a2fb3348f027bf7a940c0 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 12 Sep 2024 20:53:45 +0300 Subject: [PATCH] userspace: Add missing alpha channels --- userspace/libraries/LibGUI/Window.cpp | 2 +- userspace/tests/test-window/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/userspace/libraries/LibGUI/Window.cpp b/userspace/libraries/LibGUI/Window.cpp index 39e2e408..d940dd9c 100644 --- a/userspace/libraries/LibGUI/Window.cpp +++ b/userspace/libraries/LibGUI/Window.cpp @@ -28,7 +28,7 @@ namespace LibGUI return BAN::Error::from_errno(EINVAL); BAN::Vector framebuffer; - TRY(framebuffer.resize(width * height)); + TRY(framebuffer.resize(width * height, 0xFF000000)); int server_fd = socket(AF_UNIX, SOCK_SEQPACKET, 0); if (server_fd == -1) diff --git a/userspace/tests/test-window/main.cpp b/userspace/tests/test-window/main.cpp index feae8330..ab62f722 100644 --- a/userspace/tests/test-window/main.cpp +++ b/userspace/tests/test-window/main.cpp @@ -10,7 +10,7 @@ void randomize_color(BAN::UniqPtr& window) uint32_t color = ((rand() % 255) << 16) | ((rand() % 255) << 8) | ((rand() % 255) << 0); for (uint32_t y = 0; y < window->height(); y++) for (uint32_t x = 0; x < window->width(); x++) - window->set_pixel(x, y, color); + window->set_pixel(x, y, 0xFF000000 | color); window->invalidate(); }