From 76d52e07d46e870664b3fc0655aa0ff600a95875 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 23 Jan 2022 13:39:33 +0100 Subject: [PATCH 1/2] fixed: freeze when clicking during sheet animation previously, the app froze when clicking somewhere during sheet open/close animations. these adversarial clicks are simply ignored by this PR --- AppKit/CPWindow/CPWindow.j | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 0a59d1538..e1c42a862 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -1901,6 +1901,9 @@ CPTexturedBackgroundWindowMask // CPLeftMouseDown is needed for window moving and resizing to work. // CPMouseMoved is needed for rollover effects on title bar buttons. + if (sheet && (_sheetContext["isClosing"] || _sheetContext["isOpening"])) + return; + if (sheet && _sheetContext["isAttached"]) { switch (type) From 1ef49ef2901417c3552f4f3d1ff81123cf0a6492 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 23 Jan 2022 13:42:12 +0100 Subject: [PATCH 2/2] formatting --- AppKit/CPWindow/CPWindow.j | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index e1c42a862..438ec9865 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -1901,6 +1901,8 @@ CPTexturedBackgroundWindowMask // CPLeftMouseDown is needed for window moving and resizing to work. // CPMouseMoved is needed for rollover effects on title bar buttons. + // ignore events that happen during open / close animations + // not ignoring these would cause the app to freeze thereafter if (sheet && (_sheetContext["isClosing"] || _sheetContext["isOpening"])) return;