Browse Source

Fix window minimization.

A non-client click was being received after the click to minimize the window, which caused a call to `_parent->BringToFront();`, meaning the window got immediately restored. Ignore clicks when the window is minimized.

Fixes #8335
pull/8405/head
Steven Kirk 4 years ago
parent
commit
20ddbad2ad
  1. 3
      native/Avalonia.Native/src/OSX/AvnWindow.mm

3
native/Avalonia.Native/src/OSX/AvnWindow.mm

@ -440,6 +440,9 @@
{ {
case NSEventTypeLeftMouseDown: case NSEventTypeLeftMouseDown:
{ {
if ([self isMiniaturized])
break;
AvnView* view = _parent->View; AvnView* view = _parent->View;
NSPoint windowPoint = [event locationInWindow]; NSPoint windowPoint = [event locationInWindow];
NSPoint viewPoint = [view convertPoint:windowPoint fromView:nil]; NSPoint viewPoint = [view convertPoint:windowPoint fromView:nil];

Loading…
Cancel
Save