Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add permission prompts for macOS Catalina #59

Merged
merged 5 commits into from
Nov 13, 2019

Conversation

stanczakp
Copy link
Contributor

This update adds permissions prompt for MacOS Catalina to allow active-win to get window title.

@lkobylski
Copy link
Contributor

I think it should resolve problem with empty title field on macOS Catalina. @sindresorhus .

let frontmostAppPID = NSWorkspace.shared.frontmostApplication!.processIdentifier
let windows = CGWindowListCopyWindowInfo([.optionOnScreenOnly, .excludeDesktopElements], kCGNullWindowID) as! [[String: Any]]

let windowImage = CGWindowListCreateImage(.null, .optionIncludingWindow, windows[0][kCGWindowNumber as String] as! CGWindowID, [.boundsIgnoreFraming, .bestResolution])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be clearer from the naming here that this is to trigger the permission dialog.

Sources/active-win/main.swift Outdated Show resolved Hide resolved
Sources/active-win/main.swift Outdated Show resolved Hide resolved
@sindresorhus sindresorhus changed the title ADD permisions prompt for title window on macos catalina Add permissions prompts for macOS Catalina Nov 13, 2019
@sindresorhus sindresorhus changed the title Add permissions prompts for macOS Catalina Add permission prompts for macOS Catalina Nov 13, 2019
@sindresorhus sindresorhus merged commit 90cfc44 into sindresorhus:master Nov 13, 2019
sindresorhus added a commit that referenced this pull request Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants