sindresorhus / get-windows

Get metadata about the active window and open windows (title, id, bounds, owner, etc)
MIT License
798 stars 166 forks source link

chore: remove accessibility permission check and option #179

Closed kentbetita closed 8 months ago

kentbetita commented 8 months ago

Description

The accessibility permission is no longer needed to get the url of the active browser tab. As a result, the accessibilityPermission option and the associated checks for process/application trust have been removed from the codebase.

Changes

Demo

https://github.com/sindresorhus/active-win/assets/153492344/0547a253-eeb3-49a6-b859-314892edb96a

Related

kentbetita commented 8 months ago

Hey @sindresorhus,

Oops, I dropped the ball on #177. I was coding away in VS Code and forgot it already had the accessibility permissions set up, so I got tricked into thinking everything was working perfectly with the accessibilityPermission option. But then, when I ran the app live, it was still asking for accessibility permission – my bad!

I doubled down on the problem for issue #179 (which was #178 before), and after some serious digging, I found out we can actually still snag the url property without needing those accessibility permissions at all. Hence, we actually don't really need the accessibility permission check anymore.

I'm really sorry for the oversight. Thanks for your patience and understanding. Won't happen again! 🙏🏻

kentbetita commented 8 months ago

Hey @sindresorhus, just giving you a little nudge! 😄 Hope you're doing great!

sindresorhus commented 8 months ago

I'm pretty sure it's required, but it may only be required for sandboxed apps.

kentbetita commented 8 months ago

I think I've found a solution that works for both cases now. Will close this one out and submit another PR!