Fix critical macOS crash and add icon size configuration#1
Conversation
This commit addresses three vital issues: 1. Fix issue crabnebula-dev#23 - macOS app crashes when using JS API - Fixed incorrect NSPoint extraction from backingAlignedRect (line 70) - The method returns NSRect, not NSPoint - now properly extracting .origin - Fixed callback type mismatch in drop handler (line 273) - Changed from Fn(DragResult) to Fn(DragResult, CursorPosition) 2. Fix issue crabnebula-dev#41 - Large drag preview images - Added optional icon_size field to Options struct - Allows users to specify custom icon dimensions (width, height) - Implemented on both macOS (using setSize) and Windows (SHDRAGIMAGE) - Maintains backward compatibility - None uses original size Note: These fixes compile successfully but require manual GUI testing on respective platforms to fully verify functionality. Related issues: crabnebula-dev#23, crabnebula-dev#41
|
Hi @ANAVHEOBA, Thanks a lot for this fix! 🐙 We really appreciate the effort, sorry it has taken a while to get back to you. We keep the upstream drag‑rs repo here: https://github.com/crabnebula-dev/drag-rs, and we’ve got the same bugs filed as crabnebula-dev#23 and crabnebula-dev#41 in our codebase. Your patches look solid and would be good for everyone using the library. Would you be up for opening a PR against crabnebula-dev/drag-rs with these changes? If you’d rather we handle the port, that’s fine too—we’ll make sure to credit your work properly. Either way, huge thanks for tackling these critical issues! Best, |
|
Yes, I do that and I also wanted you to know that I would be a great addition to your team, always innovating solution and I want to work in a good team, would love to join your team, thank you |
This commit addresses three vital issues:
Fix issue [Tauri] App crashes when using the js api crabnebula-dev/drag-rs#23 - macOS app crashes when using JS API
Fix issue [bug][v2] Pictures are very large when dragging them crabnebula-dev/drag-rs#41 - Large drag preview images
Note: These fixes compile successfully but require manual GUI testing on respective platforms to fully verify functionality.
Related issues: crabnebula-dev#23, crabnebula-dev#41