From 0bd7fb150af1def4e22e7e1545553536aad360f4 Mon Sep 17 00:00:00 2001 From: Julien Lebosquain Date: Tue, 17 Mar 2026 17:23:59 +0100 Subject: [PATCH] Xdnd: fix in process completion --- src/Avalonia.X11/Selections/DragDrop/X11DragSource.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.X11/Selections/DragDrop/X11DragSource.cs b/src/Avalonia.X11/Selections/DragDrop/X11DragSource.cs index 5c10d97288..1fe1fdfc42 100644 --- a/src/Avalonia.X11/Selections/DragDrop/X11DragSource.cs +++ b/src/Avalonia.X11/Selections/DragDrop/X11DragSource.cs @@ -32,9 +32,7 @@ internal sealed class X11DragSource(AvaloniaX11Platform platform) : IPlatformDra var cursorFactory = AvaloniaLocator.Current.GetService() 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 {