This repository was archived by the owner on Dec 11, 2019. It is now read-only.
Set frame index immediately when tab inserted to window tab strip. #14295
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.
Fix #14281
A recent change in muon (between 6.0.9 and 6.0.11) has meant that certain tabs (usually with opener tabs) have an invalid index (-1) before they are added to the window tab strip. In such a case, we add the frame at the last index in the frame state. When the tab received a valid window tab strip, the window was notified and the tab UI shown. However, the index change event was notified separately, causing a delay, and a flash of the tab at the last index of the tab strip, followed by a move to the correct index.
Instead, with this change, we set the frame index immediately, as soon as we set the property that informs the tab has been inserted to the window's tab strip.
Validates input just in case we receive an invalid index (e.g. -1). However, there is no known scenario where this could happen at the moment.
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests