| Summary: | [Patch] Mac: add support for dragging files directly onto SDL windows | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | video | Assignee: | Jørgen Tjernø <jorgen> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | jorgen |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Mac OS X (All) | ||
| Attachments: |
Patch to allow users to drop files onto SDL windows in OS X
Updated patch to allow users to drop files onto SDL windows in OS X |
||
Created attachment 1909 [details]
Updated patch to allow users to drop files onto SDL windows in OS X
The previous patch didn't handle OS X alias files. I've attached a new updated patch which does.
if (isAlias != nil && [isAlias boolValue]) {
Just using [isAlias boolValue] is cleaner -- calling any method on nil returns nil, which is a false value.
Other than that, it LGTM. I can merge and make that change.
|
Created attachment 1907 [details] Patch to allow users to drop files onto SDL windows in OS X SDL's Cocoa code currently triggers SDL_DROPFILE events when the user drops a file onto the application's icon, but another idiomatic way for OS X users to drag-and-drop files is to put the file directly inside the window's frame. I have attached a patch which adds that functionality to SDL's Cocoa video backend.