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

[Bug] Switching away from certain apps is not detected #3

Open
rami3l opened this issue Aug 14, 2023 · 3 comments
Open

[Bug] Switching away from certain apps is not detected #3

rami3l opened this issue Aug 14, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@rami3l
Copy link
Owner

rami3l commented Aug 14, 2023

For several apps, Claveilleur can use AXFocusedWindowChanged to see if they are switched to, but it doesn't seem to know when they are switched away from.

Some examples include:

  • com.apple.notificationcenterui
  • com.apple.controlcenter

The current workaround is simply to first switch to another app that doesn't have this issue, and after that everything will work as intended again.

@rami3l
Copy link
Owner Author

rami3l commented Aug 14, 2023

An interesting reference (if we want to implement browser tab watching somewhere down the road 1): https://github.com/tekezo/Karabiner/blob/6181ef9c9a6aeecd4162720884fbbaa2596ee03a/src/util/AXNotifier/Karabiner_AXNotifier/Classes/AXApplicationObserverManager.m

A quick and dirty solution might be to ignore their existence at all. See: https://github.com/ianyh/Amethyst/blob/4d0e820beb25f4bdb89088326a470a9132d89ccb/Amethyst/Categories/NSRunningApplication%2BManageable.swift#L18-L37

Footnotes

  1. ... but I'm reluctant to do so.

@rami3l rami3l changed the title [Bug] Switching away from certain apps are not detected [Bug] Switching away from certain apps is not detected Aug 15, 2023
@rami3l
Copy link
Owner Author

rami3l commented Nov 7, 2023

We have temporarily excluded these apps from the observation in 5efbe89 and 8ff0dc8.

4c9a567 shows a theoretically working solution, but since the lag was prominent (cf. the commit message), the solution was not quite ideal.

@rami3l rami3l added the bug Something isn't working label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@rami3l and others