Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Patch] Mac: add support for dragging files directly onto SDL windows #1667

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: Mac OS X (All), x86_64

Comments on the original bug report:

On 2014-10-19 18:58:34 +0000, Alex Szpakowski wrote:

Created attachment 1907
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.

On 2014-10-20 05:38:24 +0000, Alex Szpakowski wrote:

Created attachment 1909
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.

On 2014-11-24 19:42:18 +0000, Jørgen Tjernø wrote:

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.

On 2014-11-24 19:48:01 +0000, Jørgen Tjernø wrote:

Fixed in https://hg.libsdl.org/SDL/rev/2cc90bb31777

@SDLBugzilla SDLBugzilla added the enhancement New feature or request label Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant