Fix transparent background for text drag thumbnail on macOS

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/20db1e1c-78e0-46b0-aa55-281f88408d6f

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-06 11:55:38 +00:00 committed by GitHub
parent 3d7cda3e21
commit a3c09cc1be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -952,7 +952,7 @@ cocoa_render_line_of_text(const char *text, const color_type fg, const color_typ
CGContextSetShouldAntialias(ctx, true);
CGContextSetShouldSmoothFonts(ctx, true); // sub-pixel antialias
CGContextSetRGBFillColor(ctx, ((bg >> 16) & 0xff) / 255.f, ((bg >> 8) & 0xff) / 255.f, (bg & 0xff) / 255.f, 1.f);
CGContextSetRGBFillColor(ctx, ((bg >> 16) & 0xff) / 255.f, ((bg >> 8) & 0xff) / 255.f, (bg & 0xff) / 255.f, ((bg >> 24) & 0xff) / 255.f);
CGContextFillRect(ctx, CGRectMake(0.0, 0.0, width, height));
CGContextSetTextDrawingMode(ctx, kCGTextFill);
CGContextSetTextMatrix(ctx, CGAffineTransformIdentity);