You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caches the bezel background until its size, opacity, or color changes, and releases temporary CGColor objects after layer assignment. No behavior or appearance changes are intended.
Thanks for this — the background caching is correct, MRC-safe, and merges cleanly.
One request before merging: while you're in BezelWindow.m, could you also fix the CGColor leaks in -update? The CGColorCreateGenericRGB(...) results used for the background/border there (around lines 136–138, plus the similar ones in init) are never CFRelease'd, so they leak on every window update. Since -update runs on every bezel refresh, CFRelease-ing those is arguably a bigger per-update win than the pattern-image cache itself, and it fits naturally alongside this change.
Minor note on framing: the bezel is orderOut'd (hidden) while idle, so this reduces redraw cost while the bezel is on screen rather than idle CPU. The constant idle CPU in #282 is the ~1s pasteboard-polling timer, so I'd like to keep #282 open for that separately. But this is a solid improvement for active-bezel redraws — happy to merge once the CGColor releases are folded in.
Thank you for the feedback! I added the CGColor releases.
emanuelst
changed the title
Cache Flycut's bezel background to reduce idle CPU usage
Reduce bezel redraw work and release CGColors
Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caches the bezel background until its size, opacity, or color changes, and releases temporary CGColor objects after layer assignment. No behavior or appearance changes are intended.
AI-assisted; reviewed and tested locally.