Skip to content

Commit

Permalink
🐛 Fix #366
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKai77 committed May 30, 2024
1 parent d53a542 commit 4cf3833
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 8 additions & 10 deletions Loop/Managers/WindowDragManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions Loop/Window Management/WindowEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -100,8 +101,6 @@ struct WindowEngine {

WindowEngine.handleSizeConstrainedWindow(window: window, screenFrame: screen.safeScreenFrame)
}

WindowRecords.record(window, action)
}

static func getTargetWindow() -> Window? {
Expand Down

0 comments on commit 4cf3833

Please sign in to comment.