Not sure if this is expected behavior, or a bug.
If expected behavior, then can anyone tell me what I should be doing or what I'm doing wrong.
I have an application that takes files with Drag and Drop from the Finder (same effect occurs with other Filemanagers like Forklift and PathFinder as well).
As long as the onDropFiles event has not been completed, drag and drop in Finder will not work properly, for example when a large number of files is being processed in the onDropFiles, making Finder unusable until the event has been completed.
This can be demonstrated with a simple example:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormDropFiles(Sender: TObject; const FileNames: array of string);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormDropFiles(Sender: TObject; const FileNames: array of string);
begin
ShowMessage('temporary "lock" FormDropFiles');
end;
end.
Attached an example screen recording, hopefully this helps clarifying what I'm running into.
While the onDropFiles event is running, selecting a file in Finder and dragging it will cause everything to be selected the mouse moves over.
Once the onDropFiles event is completed, drag and drop in Finder works normal again.
Both can be seen in the screen recording.
Could it be that concludeDragOperation (
DraggingDestination - concludeDragOperation) may need to be called earlier (not knowing what I'm talking about)?