Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637import Carbonimport Foundation
@MainActorfunc checkTabViewIgnored(_ session: RealitySession) async throws { try TabViewConsoleSession.requireUnlockedConsole() try requireTabViewModifierReleaseRouting() try session.configure() let rule = "\n[[rules]]\nbundle-id = 'com.apple.calculator'\naction = 'ignore'\n" let handle = try FileHandle(forWritingTo: session.config) try handle.seekToEnd() try handle.write(contentsOf: Data(rule.utf8)) try handle.close() let owned = try await session.startingWindows([.textEdit, .calculator]) let document = owned[0] let ignored = owned[1] let before = try session.readFrames([ignored])[0] try await session.start() try await session.apps.focus(document) try await Task.sleep(for: .milliseconds(500)) try await tabViewInput(session, arrow: UInt16(kVK_Tab), stage: "ignored-visible", holdMilliseconds: 500) try await session.expect("Ignored window cannot be selected or rearranged by Tab View") { rows in let frame = try FrameOracle.frames(rows, ids: [ignored.id])[0] return RealApps.focusedID(rows) == document.id && frame.matches(before) } _ = try await session.driver.send(.minimize(pid: ignored.pid, windowID: ignored.id)) try await session.expect("Ignored minimized window leaves the screen") { rows in !rows.contains { $0.id == ignored.id && $0.onscreen } } try await session.apps.focus(document) try await Task.sleep(for: .milliseconds(500)) try await tabViewInput(session, arrow: UInt16(kVK_DownArrow), stage: "ignored-minimized", holdMilliseconds: 500) try await session.expect("Ignored minimized window is not restored by Tab View") { rows in RealApps.focusedID(rows) == document.id && !rows.contains { $0.id == ignored.id && $0.onscreen } }}