Browse Source

Xdnd: fix in process completion

pull/20926/head
Julien Lebosquain 7 months ago
parent
commit
0bd7fb150a
No known key found for this signature in database GPG Key ID: 1833CAD10ACC46FD
  1. 6
      src/Avalonia.X11/Selections/DragDrop/X11DragSource.cs

6
src/Avalonia.X11/Selections/DragDrop/X11DragSource.cs

@ -32,9 +32,7 @@ internal sealed class X11DragSource(AvaloniaX11Platform platform) : IPlatformDra
var cursorFactory = AvaloniaLocator.Current.GetService<ICursorFactory>() as X11CursorFactory;
using var handler = new Handler(platform, window.Handle, dataTransfer, allowedEffects, cursorFactory);
await handler.Completion;
return DragDropEffects.None;
return await handler.Completion;
}
private sealed class Handler : IDisposable
@ -199,6 +197,8 @@ internal sealed class X11DragSource(AvaloniaX11Platform platform) : IPlatformDra
{
var rootPosition = new PixelPoint(button.x_root, button.y_root);
ProcessRawDragEvent(lastTarget.InProcessWindow, RawDragEventType.Drop, rootPosition);
_lastTarget = null;
_completionSource.TrySetResult(_currentEffects);
}
else
{

Loading…
Cancel
Save