Get metadata about the active window and open windows (title, id, bounds, owner, etc)
by sindresorhusJavaScript
Last 12 weeks · 0 commits
4 of 6 standards met
This is perhaps related to but not identical to https://github.com/sindresorhus/active-win/issues/88. I don't want to opt out of access dialogs altogether, I just want it to show up once and then recognise the access. The problem Every time (or ) is called, this prompt shows up, even though I have added the permissions in system preferences: !Screenshot 2022-03-01 at 9 21 53 What I'm doing I am calling in a in an electron app built for MacOS with . Here's my app: This runs fine in the terminal in VSCode (which asked for the permission once, and from there on it was fine). Attempts to figure it out I've also tried using electron's , like so: When I run this, the app asks for permission (for screen recording) once and when it has been granted in the system preferences the prompt does not show up again. So it seem to me that macOS is able to identify my app and give it permissions in that case, at least. I've tried: Fiddling around with various build parameters to make sure all the fields such as bundle ID are set up to uniquely ID the app correctly (no effect) Asking for accessibility permission up front using https://github.com/karaggeorge/macos-accessibility-permissions setting up entitlements.mac.plist I have not tried: Setting up code signing for my app forking and modifying the swift-code to bypass the prompt (as seen in #67) Additional info Here's my build config: entitlements.mac.plist:
Issue : On longer running process for getting the windows specifically for Windows 10 . I haven't tried on other systems, but it was filling up the kernel object storage leaving the logs writers behind which it leads to crashing with an error unhandled and error. Fix : closing out has fixed the unhandled processes window, which clears up the storage a the kernel object storage.
Fix for the the issue #161 Cause Fullscreen apps often do not have a caption/title bar () and are implemented as popup windows (). The old filter dropped these windows from results even though they are valid top-level visible windows. What changed now includes fullscreen apps that were previously missing, while preserving existing filters for tool windows and child windows. Updated in main.cc. Added style checks: Replaced the strict caption requirement with:
Repository: sindresorhus/get-windows. Description: Get metadata about the active window and open windows (title, id, bounds, owner, etc) Stars: 917, Forks: 194. Primary language: JavaScript. Languages: JavaScript (44.6%), C++ (28.6%), Swift (19.3%), TypeScript (4.6%), Python (2.9%). License: MIT. Topics: active-window, javascript, node-module, nodejs, npm-package. Latest release: v9.3.0 (5mo ago). Open PRs: 0, open issues: 44. Last activity: 5mo ago. Community health: 71%. Top contributors: sindresorhus, keheliya, wrgoto, miniben-90, tiangolo, kentbetita, albinekb, ahallicks, ambarvm, binyamin and others.