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
Add higher-performance, image based hs.window:setSize() #923
Comments
HS (tries to) handle window animations at 60 fps internally iirc. |
yes, moving a window is just moving a texture around in GPU memory. resizing involves lots of round-trips to the application and all the UI frameworks, to redraw. |
Back when I was porting someone's pull request for mjolnir into https://github.com/szymonkaliski/mjolnir.sk.transform which later made it into HS (AFAIK), I had an idea to grab the contents of window as image, animate the image transformation (much faster), and in last few ticks of animation actually move the window to new place (triggering the actual window-resize only once). Never actually made it, and don't have time to play around it currently, but if some of you have — I'd love to see it! :) |
I don't think |
Yeah, I wasn't thinking about |
Make sense that it is the OS/app redraw that's expensive. Should I close the ticket? 😄 |
@eproxus depends if we want to do the version of this that's resizing an image. I would think we'd either want to have it as its own feature in hs.window, or we'd teach hs.drawing to do animated resizes, which would be very fast if they used the system APIs rather than some kind of hs.timer driven madness. I'll leave it open as a "help wanted" enhancement, and we can see if anyone picks it up :) |
Resizing windows with the mouse in OS X is quite responsive. Can't we just decrease the step size a bit, to find a sweet spot? |
I'm going to close this out because it doesn't seem to be going anywhere. If someone would like to work on it, please feel free to re-open. Sorry! |
When using setFrame moving a window is buttery smooth, but when the window changes size it feels like the frame rate is 10 FPS or something. The animation duration is configurable via
hs.window.animationDuration
but can the frame rate for window resizing be made configurable or increased to something smoother?The text was updated successfully, but these errors were encountered: