formatting, debug stuff

This commit is contained in:
neon443
2025-05-30 16:07:07 +01:00
parent 4b0e0db186
commit 6c9d65f026
4 changed files with 29 additions and 26 deletions

View File

@@ -127,12 +127,18 @@ class MouseTracker {
} }
func start() { func start() {
#if DEBUG
skyHigh.show()
#endif
self.monitor = NSEvent.addGlobalMonitorForEvents(matching: .mouseMoved, handler: checkMouse) self.monitor = NSEvent.addGlobalMonitorForEvents(matching: .mouseMoved, handler: checkMouse)
self.running = true self.running = true
print("started tracking") print("started tracking")
} }
func stop() { func stop() {
#if DEBUG
skyHigh.hide()
#endif
if let monitor = monitor { if let monitor = monitor {
NSEvent.removeMonitor(monitor) NSEvent.removeMonitor(monitor)
self.running = false self.running = false

View File

@@ -35,9 +35,6 @@ class SkyHigh {
window.ignoresMouseEvents = true window.ignoresMouseEvents = true
window.hasShadow = true window.hasShadow = true
window.collectionBehavior = NSWindow.CollectionBehavior.canJoinAllSpaces.union(.stationary) window.collectionBehavior = NSWindow.CollectionBehavior.canJoinAllSpaces.union(.stationary)
#if DEBUG
show()
#endif
} }
func move(to: CGPoint) { func move(to: CGPoint) {