From 1f4d21244a3c4cd50ed16ca5990ddb3ec4983530 Mon Sep 17 00:00:00 2001 From: boombuler Date: Fri, 4 May 2018 07:35:34 +0200 Subject: [PATCH] register `DragSource` after the UI thread has set due to the fact that the UI-Thread is unknown, there is no OLEContext available and the platform specific DragSource will never be used. --- src/Windows/Avalonia.Win32/Win32Platform.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Windows/Avalonia.Win32/Win32Platform.cs b/src/Windows/Avalonia.Win32/Win32Platform.cs index 902abaf65b..f06f951d74 100644 --- a/src/Windows/Avalonia.Win32/Win32Platform.cs +++ b/src/Windows/Avalonia.Win32/Win32Platform.cs @@ -86,11 +86,11 @@ namespace Avalonia.Win32 .Bind().ToConstant(s_instance) .Bind().ToConstant(s_instance); - if (OleContext.Current != null) - AvaloniaLocator.CurrentMutable.Bind().ToSingleton(); - UseDeferredRendering = deferredRendering; _uiThread = UnmanagedMethods.GetCurrentThreadId(); + + if (OleContext.Current != null) + AvaloniaLocator.CurrentMutable.Bind().ToSingleton(); } public bool HasMessages()