Browse Source

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.
pull/1545/head
boombuler 8 years ago
parent
commit
1f4d21244a
  1. 6
      src/Windows/Avalonia.Win32/Win32Platform.cs

6
src/Windows/Avalonia.Win32/Win32Platform.cs

@ -86,11 +86,11 @@ namespace Avalonia.Win32
.Bind<IWindowingPlatform>().ToConstant(s_instance)
.Bind<IPlatformIconLoader>().ToConstant(s_instance);
if (OleContext.Current != null)
AvaloniaLocator.CurrentMutable.Bind<IPlatformDragSource>().ToSingleton<DragSource>();
UseDeferredRendering = deferredRendering;
_uiThread = UnmanagedMethods.GetCurrentThreadId();
if (OleContext.Current != null)
AvaloniaLocator.CurrentMutable.Bind<IPlatformDragSource>().ToSingleton<DragSource>();
}
public bool HasMessages()

Loading…
Cancel
Save