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

When switching windows quickly, the yellow outline gets left behind #46

Closed
tntmarket opened this issue Apr 12, 2020 · 2 comments · Fixed by #48
Closed

When switching windows quickly, the yellow outline gets left behind #46

tntmarket opened this issue Apr 12, 2020 · 2 comments · Fixed by #48
Labels

Comments

@tntmarket
Copy link

tntmarket commented Apr 12, 2020

To Reproduce:

Switch back and forth between windows quickly
Video: https://gfycat.com/officialsnivelingemperorpenguin

Result: The yellow outline when switching focus stays, even after closing or moving the window

Workaround: Reload config in hammerspoon

My Computer:
Mac Version: 10.15.4
Hammerspoon Version: [0.9.78]
Spacehammer Version: 9c99680

Potential Duplicate: #9

@jaidetree
Copy link
Collaborator

Confirming error reproduction.

Current hypothesis:
While not seemingly related to #9 it seems to mirror #31 where after many, rapid uses it seems to stop working. The cause was the garbage collector cleaning up refs to the listeners that were not stored anywhere.

Possible fixes:

  • Create a shared ref to the rectangle object the jump function sets so that there will never be more than 1 highlighted window and timer to clean up.
  • Create a queue or stream of these events to clean up. May require an FRP stream library I'm drafting for fennel.

I'm going to give solution #1 a shot as that will be much faster to draft and test. Thanks for the detailed report.

jaidetree added a commit to jaidetree/spacehammer that referenced this issue Apr 12, 2020
- Addresses window jump highlight persisting after many quick jumps
- Creates a var containing a cleanup function and ensures only 1 rect
  is displayed at a time
@agzam agzam added the bug label Apr 22, 2020
@agzam
Copy link
Owner

agzam commented Apr 22, 2020

@tntmarket Thank you for reporting it, and thank you @eccentric-j for addressing it so quickly. I am sorry folks for being very slow at approving and reviewing things. My team got furloughed due to COVID-19 crisis, and the job search occupies most of my time lately. I approved the PR and I hope we can merge the fix soon.

jaidetree added a commit that referenced this issue Apr 22, 2020
Fixes #46 yellow window highlight staying behind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants