Repository navigation
frontend: keep a dock change that comes with a window resize (#5230) - #5245
Merged
Merged
Conversation
On a tiling window manager a dock change and a window resize often come together: a dock dragged out of the window becomes a new window and the compositor retiles. Since #4841, DockProportions sees a user change only at the same window size, so the resize puts the start layout back over the change, and quit saves the start layout. Reset Docks is undone the same way, and every later start repeats it. Both cases fail on master and pass with the helper from before #4841. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#4841 restores the start layout on each window resize until the user changes a dock, and it saw a change only at the same window size. On a tiling window manager a dock change and a window resize often come together: the dock moved back, Reset Docks was undone, and quit saved the start layout again, so every start repeated it. DockProportions now also keeps where the docks are once a restore has settled (area, order in the area, floating, hidden, tabs), which a window resize does not change. A different placement ends the restores, with or without a resize. Reset Docks also ends them: the reset layout is the user's. GREEN for floated_dock_stays_when_the_window_resizes_at_the_same_time and reset_docks_stays_when_the_window_resizes_at_the_same_time; the #3740 cases still pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
vpacher
marked this pull request as draft
November 19, 2026 14:14
vpacher
marked this pull request as ready for review
November 19, 2026 14:47
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.
Refs #5230. Fixes a regression from #4841.
Problem
#4841 restores the start layout on each window resize until the user changes a dock, but it saw a change only at the same window size. On a tiling window manager a dock change and a window resize often come together (a dock dragged out of the window becomes a new window, and the compositor retiles). Then the dock moved back, Reset Docks was undone, and quit saved the start layout again, so every start repeated it.
Change
DockProportionsalso keeps where the docks are once a restore has settled: area, order in the area, floating, hidden and tabs. A window resize does not change it. A different placement ends the restores, with or without a resize. The check is skipped while the window is hidden.DockStateRestored(QByteArray()), so the reset layout counts as the user's and is what quit saves.Tests
floated_dock_stays_when_the_window_resizes_at_the_same_timeandreset_docks_stays_when_the_window_resizes_at_the_same_timeintest_dock_state_restart. On master both fail: the floated dock is docked again after the resize (floating=0), and dock 2 is back in the left area after Reset Docks and the resize. The other 29 Qt-linked tests pass.test_dock_state_restartandtest_dock_proportions.Where it ran: Qt 6.11.1 with QtTest,
ci/linux_qt_frontend.pyunder Xvfb, locally on Linux. The Qt Frontend Linux job in CI does not run these tests yet, because its Qt has no QtTest (#4837).Test cost: two new cases in the existing binary;
test_dock_state_restarttakes about 1.8 s in all. 25 repeated runs oftest_dock_state_restartandtest_dock_proportionsall passed. No own threads.Not tested: Hyprland itself. The cases resize the window the way a tiling window manager does.
Refs, notFixes, until the reporter confirms it on Hyprland. The first symptom in #5230 (no docks at all at the first start) is not explained yet.Tiers: Tier 1 (Rust), Tier 3 (differential) and Tier 4 (protocol) do not apply, because this is frontend C++ with no C original in libobs. The Qt test is the frontend's test tier.
🤖 Generated with Claude Code