diff --git a/apps/desktop/src-tauri/src/drag.rs b/apps/desktop/src-tauri/src/drag.rs index bff25d3d26da..126b45fa3569 100644 --- a/apps/desktop/src-tauri/src/drag.rs +++ b/apps/desktop/src-tauri/src/drag.rs @@ -77,11 +77,11 @@ pub async fn start_drag( image: String, on_event: Channel, ) -> Result<(), String> { + // If on linux, do not run and throw an error saying that it is not supported for now #[cfg(target_os = "linux")] - let window = window - .gtk_window() - .map_err(|_| "Failed to downcast to ApplicationWindow")?; - + { + return Err("Drag and drop is not supported on Linux yet.".to_string()); + } // Check if image string is base64 encoded let icon_path = if image.starts_with("data:image/") { image diff --git a/apps/desktop/src/commands.ts b/apps/desktop/src/commands.ts index f9e212cb244a..8516120a8af6 100644 --- a/apps/desktop/src/commands.ts +++ b/apps/desktop/src/commands.ts @@ -61,13 +61,13 @@ export const commands = { */ async startDrag( files: string[], - iconPath: string, + image: string, onEvent: TAURI_CHANNEL ): Promise> { try { return { status: 'ok', - data: await TAURI_INVOKE('start_drag', { files, iconPath, onEvent }) + data: await TAURI_INVOKE('start_drag', { files, image, onEvent }) }; } catch (e) { if (e instanceof Error) throw e;