Browse Source

Add fix for monomac borderless windows being

transparent to mouse clicks when they shouldnt be.
pull/1744/head
Dan Walmsley 8 years ago
parent
commit
4f84db9080
  1. 10
      src/OSX/Avalonia.MonoMac/WindowImpl.cs

10
src/OSX/Avalonia.MonoMac/WindowImpl.cs

@ -3,6 +3,7 @@ using Avalonia.Controls;
using Avalonia.Platform;
using MonoMac.AppKit;
using MonoMac.CoreGraphics;
using Avalonia.Threading;
namespace Avalonia.MonoMac
{
@ -16,7 +17,14 @@ namespace Avalonia.MonoMac
public WindowImpl()
{
UpdateStyle();
// Post UpdateStyle to UIThread otherwise for as yet unknown reason.
// The window becomes transparent to mouse clicks except a 100x100 square
// at the top left. (danwalmsley)
Dispatcher.UIThread.Post(() =>
{
UpdateStyle();
});
Window.SetCanBecomeKeyAndMain();
Window.DidResize += delegate

Loading…
Cancel
Save