by smoldesu · 5y ago · 0 comments
Realistically, you won’t need to chain window movement like this in most cases (other than our chatbox, I think none of our windows stay open when their parent window is moved). Fast auto-resizing, on the other hand, is more common, and works great.
We can get the position of our _own_ windows easily, but when it comes to getting Spotify’s position, we need to do some more complex polling, which is slower (and only works when the 3rd-party window is in focus).
What's Tandem are doing here is (interesting, but) atypical behaviour.
See this demo: http://stewd.io/pong/
It's still not 100% smooth, but it seems slightly better and demonstrates the ability to manually tween values. Similar performance in both Chrome and Safari.
Is this a macOS specific issue, or is the JS API these guys are providing not able to catch up quickly enough?
In the actual Tandem app, windows moving like this is uncommon.