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

(Linux) drag and drop file support in the editor #696

Open
portaloffreedom opened this issue Jun 19, 2023 · 1 comment
Open

(Linux) drag and drop file support in the editor #696

portaloffreedom opened this issue Jun 19, 2023 · 1 comment
Labels
improvement Improvements to an existing feature

Comments

@portaloffreedom
Copy link
Collaborator

Drag and drop in the Editor is only supported on Windows at the moment

@portaloffreedom portaloffreedom added the improvement Improvements to an existing feature label Jun 19, 2023
@turanszkij
Copy link
Owner

The windows implementation works like this:

  1. enable drag and drop file application-wide with DragAcceptFiles(hWnd, TRUE);
  2. parse WM_DROPFILES message from OS and retrieve file names with DragQueryFile() function
  3. For each filename, call editor.renderComponent.Open(filename);
  4. At the end set window to foreground for better user experience with SetForegroundWindow(hWnd);. Without this, application is in background and remains paused, so it looks as if file drop wasn't registered until user goes back to the window.

Maybe this will help linux implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants