From 4cf3833ef89870b9b0d564b07374d1715586e358 Mon Sep 17 00:00:00 2001 From: Kai Azim <68963405+MrKai77@users.noreply.github.com> Date: Wed, 29 May 2024 21:20:57 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20#366?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loop/Managers/WindowDragManager.swift | 18 ++++++++---------- Loop/Window Management/WindowEngine.swift | 3 +-- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Loop/Managers/WindowDragManager.swift b/Loop/Managers/WindowDragManager.swift index 1fce60bc..5c0e1489 100644 --- a/Loop/Managers/WindowDragManager.swift +++ b/Loop/Managers/WindowDragManager.swift @@ -147,16 +147,14 @@ class WindowDragManager { print("Window snapping direction changed: \(direction)") - if Defaults[.previewVisibility] { - self.previewController.open(screen: screen, window: nil) - - DispatchQueue.main.async { - NotificationCenter.default.post( - name: Notification.Name.updateUIDirection, - object: nil, - userInfo: ["action": WindowAction(self.direction)] - ) - } + self.previewController.open(screen: screen, window: nil) + + DispatchQueue.main.async { + NotificationCenter.default.post( + name: Notification.Name.updateUIDirection, + object: nil, + userInfo: ["action": WindowAction(self.direction)] + ) } } else { self.direction = .noAction diff --git a/Loop/Window Management/WindowEngine.swift b/Loop/Window Management/WindowEngine.swift index 1545845f..b88df0e7 100644 --- a/Loop/Window Management/WindowEngine.swift +++ b/Loop/Window Management/WindowEngine.swift @@ -61,6 +61,7 @@ struct WindowEngine { let enhancedUI = window.enhancedUserInterface ?? false let animate = Defaults[.animateWindowResizes] && !enhancedUI + WindowRecords.record(window, action) if window.nsRunningApplication == NSRunningApplication.current, let window = NSApp.keyWindow { @@ -100,8 +101,6 @@ struct WindowEngine { WindowEngine.handleSizeConstrainedWindow(window: window, screenFrame: screen.safeScreenFrame) } - - WindowRecords.record(window, action) } static func getTargetWindow() -> Window? {