+
+ private func moveWindow() {
+ print("AAAAH BEFORE WE CHANGE")
+ print("AAAAH FRAME X: \(self.frame.minX) \(self.frame.maxX) // Y: \(self.frame.minY) \(self.frame.maxY)")
+ print("AAAAH BOUNDS X: \(self.bounds.minX) \(self.bounds.maxX) // Y: \(self.bounds.minY) \(self.bounds.maxY)")
+ print("AAAAH WIN F X: \(self.window?.frame.minX) \(self.window?.frame.maxX) // Y: \(self.window?.frame.minY) \(self.window?.frame.maxY)")
+ let screen = NSScreen.screenWithMouse
+ if let currentScreen = self.window?.screen {
+ if currentScreen != screen {
+ let frame = screen?.frame ?? NSZeroRect
+ self.frame = frame
+ self.bounds = frame
+ self.updateTrackingAreas()
+
+ if let window = self.window {
+ self.bounds = frame
+ window.setFrame(frame, display: true, animate: false)
+ window.makeKeyAndOrderFront(nil)
+ window.orderFrontRegardless()
+ print("AAAAH AFTER CHANGE")
+ print("AAAAH FRAME X: \(self.frame.minX) \(self.frame.maxX) // Y: \(self.frame.minY) \(self.frame.maxY)")
+ print("AAAAH BOUNDS X: \(self.bounds.minX) \(self.bounds.maxX) // Y: \(self.bounds.minY) \(self.bounds.maxY)")
+ print("AAAAH WIN F X: \(self.window?.frame.minX) \(self.window?.frame.maxX) // Y: \(self.window?.frame.minY) \(self.window?.frame.maxY)")
+ }
+ }
+ }
+ }