From a32d509cde2853485b848ac5ca8ad177a27d7fd1 Mon Sep 17 00:00:00 2001 From: Oskari Alaranta Date: Sat, 21 Feb 2026 03:46:14 +0200 Subject: [PATCH] Fix CreateCursor masking If there was no mask, cursor would be invisible --- xbanan/Base.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xbanan/Base.cpp b/xbanan/Base.cpp index 67fa1cf..ee043ab 100644 --- a/xbanan/Base.cpp +++ b/xbanan/Base.cpp @@ -3140,7 +3140,7 @@ BAN::ErrorOr handle_packet(Client& client_info, BAN::ConstByteSpan packet) auto* source_data_u32 = reinterpret_cast(source.data.data()); for (size_t i = 0; i < cursor.width * cursor.height; i++) - cursor.pixels[i] = source_data_u32[i] ? foreground : background; + cursor.pixels[i] = 0xFF000000 | (source_data_u32[i] ? foreground : background); if (request.mask != None) { @@ -3151,8 +3151,8 @@ BAN::ErrorOr handle_packet(Client& client_info, BAN::ConstByteSpan packet) auto* mask_data_u32 = reinterpret_cast(mask.data.data()); for (size_t i = 0; i < cursor.width * cursor.height; i++) - if (mask_data_u32[i]) - cursor.pixels[i] |= 0xFF000000; + if (!mask_data_u32[i]) + cursor.pixels[i] = 0; } TRY(client_info.objects.insert(request.cid));