Skip to content

Commit

Permalink
🐞 Fix bug where Loop crashes when resizing self
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKai77 committed Sep 14, 2024
1 parent e554096 commit 0be86ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Loop/Window Management/WindowEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ enum WindowEngine {
let animate = Defaults[.animateWindowResizes] && !enhancedUI
WindowRecords.record(window, action)

if window.nsRunningApplication == NSRunningApplication.current,
let window = NSApp.keyWindow {
if window.nsRunningApplication?.bundleIdentifier == Bundle.main.bundleIdentifier,
let window = NSApp.keyWindow ?? NSApp.windows.first {
var newFrame = targetFrame
newFrame.size = window.frame.size

Expand Down

0 comments on commit 0be86ea

Please sign in to comment.