Skip to content

Commit

Permalink
Merge pull request #12478 from AvaloniaUI/fixes/dnd-unwrap-win32-data…
Browse files Browse the repository at this point in the history
…-object

Unwrap win32 data object
  • Loading branch information
Dan Walmsley authored Aug 8, 2023
2 parents d772ea8 + 8328cc7 commit 655f199
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Windows/Avalonia.Win32/DataObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public Win32Com.IEnumFORMATETC Clone()


private IDataObject _wrapped;
public IDataObject Wrapped => _wrapped;

public DataObject(IDataObject wrapped)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Windows/Avalonia.Win32/OleDropTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public static IDataObject GetAvaloniaObjectFromCOM(Win32Com.IDataObject pDataObj

if (MicroComRuntime.TryUnwrapManagedObject(pDataObj) is DataObject dataObject)
{
return dataObject;
return dataObject.Wrapped;
}
return new OleDataObject(pDataObj);
}
Expand Down

0 comments on commit 655f199

Please sign in to comment.