fix(cursor/linux): force bundled mac-style SVG pack for show-cursor

This commit is contained in:
webadderall
2026-03-16 22:41:16 +11:00
parent cc08288e23
commit 529e9c1d1b
2 changed files with 4 additions and 8 deletions
@@ -167,6 +167,7 @@ function getAvailableCursorKeys(): CursorAssetKey[] {
export async function preloadCursorAssets() {
if (!cursorAssetsPromise) {
cursorAssetsPromise = (async () => {
const isLinux = typeof navigator !== 'undefined' && /linux/i.test(navigator.platform);
let systemCursors: Record<string, SystemCursorAsset> = {};
try {
@@ -182,7 +183,9 @@ export async function preloadCursorAssets() {
SUPPORTED_CURSOR_KEYS.map(async (key) => {
const systemAsset = systemCursors[key];
const uploadedAsset = uploadedCursorAssets[key];
const assetUrl = uploadedAsset?.url ?? systemAsset?.dataUrl;
const assetUrl = isLinux
? uploadedAsset?.url
: uploadedAsset?.url ?? systemAsset?.dataUrl;
if (!assetUrl) {
console.warn(`[CursorRenderer] No cursor image for: ${key}`);
@@ -32,13 +32,6 @@ export const uploadedCursorAssets: Partial<Record<CursorAssetKey, UploadedCursor
trim: { x: 480, y: 435, width: 333, height: 553 },
fallbackAnchor: { x: 0.18, y: 0.1 },
},
'not-allowed': {
// Keep style consistent with bundled mac-like cursors instead of falling
// back to platform-specific system icons.
url: arrowUrl,
trim: { x: 480, y: 435, width: 333, height: 553 },
fallbackAnchor: { x: 0.18, y: 0.1 },
},
text: {
url: textUrl,
trim: { x: 404, y: 192, width: 247, height: 596 },