mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
[GH-ISSUE #298] Fixing macos clipboard issues #95
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ultimatepp#95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daansystems on GitHub (Sep 16, 2025).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/298
Drag & Drop files doesn't seem to work well on Macos. There are a few issues here:
2aa9f2a820/uppsrc/CtrlCore/CocoClip.mm (L58)Doesn't work for files, it will use Upp::ToString(type) to convert the type to the string "NSFilenamesPboardType" which should be "files".
I think all the types should be defined here:
This will solve the internal dragging of files for an ArrayCtrl, and the commented out code here will work again with a small fix:
2aa9f2a820/uppsrc/CtrlCore/CocoClip.mm (L378)The:
"<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"needs escaping for the two " there:
"<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"This doesn't solve dragging from an U++ ArrayCtrl to Finder yet, trying to fix that too.
Cheers.
@klugier commented on GitHub (Sep 19, 2025):
Your changes might be a good addition to our framework. Please prepare PR to fixes you did so far.
@mirek-fidler commented on GitHub (Sep 19, 2025):
Well, let me know you I have noticed this, good work, PR not necessarry for now, I am sort of waiting whether you manage "to Finder" problem...
BTW, if you are interested in MacOS, that is great as I usually get to it last (after Win32 and Linux). If you wanted another problem to play with, we are now adding title-less window support
and I am sorely missing macos implementation yet...
@daansystems commented on GitHub (Sep 30, 2025):
I made a little patch that makes dragging files work to Finder, but it's not tested for other clipboard types. The MacOS code for handling dragging and the clipboard is using a lot of deprecated calls and should probably be rewritten using beginDraggingSessionWithItems:event:source:
cococlip.patch
@klugier commented on GitHub (Jan 17, 2026):
FYI @daansystems, This PR #350 (CtrlCore: Implemented drop operation for files in Cocoa.) is addressing this issue. After this changes reference/DropFiles works like a charm on macOS.
Moreover, https://github.com/ultimatepp/ultimatepp/pull/347 has been merged to address all warnings related to usage of depricated API in our pasteboard code. So, on the latest master the compilation should be smooth and without any warnings.