fix(macos): reapply traffic light inset on title change and fullscreen exit - #1254
Merged
FabianLars merged 1 commit intoJul 28, 2026
Merged
Conversation
…n exit setTitle: and leaving fullscreen reset the window buttons to their default position without triggering a drawRect:, so the custom inset set via set_traffic_light_inset was lost until the next redraw (e.g. a resize). Reapply the inset already stored on the view's ViewState after both events. No new state is introduced; the position is read back from the taoState ivar. Fixes the traffic light reset reported downstream in tauri-apps/tauri#13044 (title change) and tauri-apps/tauri#15451 (fullscreen exit).
Contributor
Package Changes Through 7d2cdb1There are 1 changes which include tao with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Member
|
the title fix works good. couldn't reproduce the fullscreen one, waiting a few days for the issue author to respond tauri-apps/tauri#15451 |
FabianLars
approved these changes
Jul 28, 2026
FabianLars
left a comment
Member
There was a problem hiding this comment.
didn't hear back yet but the fullscreen change can't hurt i think so imo ready to go
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Moving the traffic-light-reset fix down to tao, per the discussion on tauri-apps/tauri#15628.
What
On macOS the custom traffic light inset (
set_traffic_light_inset) is lost on two events:setTitle:— the buttons snap back to default ([bug] Setting window title resets traffic light position tauri#13044)Both reporters noted resizing the window fixes it, which is the tell:
draw_rectalready re-insets on redraw (view.rs), but neithersetTitle:norwindowDidExitFullScreen:triggers adrawRect:, so the position stays default until the next redraw.How
Reapply the inset already stored on the view's
ViewState(traffic_light_inset) after both events:set_title_asyncre-insets right aftersetTitle:window_did_exit_fullscreenre-insets after the transition completesNo new state — the value is read back from the existing
taoStateivar, so it can't drift from whatset_traffic_light_insetwrote. New helperreapply_traffic_light_inset(ns_window, ns_view)inview.rs.@FabianLars this is the ivar-based version we talked about — supersedes your
refresh-lightsbranch (that one threaded a newSharedState.traffic_lights_positionand only covered the title case). Also covers fullscreen exit here.cargo checkis green; I don't have a mac to smoke-test the button positions, so a visual check would be appreciated.