Skip to content

frontend: keep a dock change that comes with a window resize (#5230) - #5245

Merged
vpacher merged 3 commits into
masterfrom
fix/5230-dock-reapply
Nov 19, 2026
Merged

vpacher merged 3 commits into
masterfrom
fix/5230-dock-reapply

Conversation

@vpacher

@vpacher vpacher commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

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

  • DockProportions also 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.
  • Reset Docks calls DockStateRestored(QByteArray()), so the reset layout counts as the user's and is what quit saves.
  • docs/features.md: the dock entry says so.

Tests

Where it ran: Qt 6.11.1 with QtTest, ci/linux_qt_frontend.py under 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_restart takes about 1.8 s in all. 25 repeated runs of test_dock_state_restart and test_dock_proportions all passed. No own threads.

Not tested: Hyprland itself. The cases resize the window the way a tiling window manager does. Refs, not Fixes, 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

vpacher and others added 3 commits November 19, 2026 15:11
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]>
@vpacher
vpacher requested a review from zackees as a code owner November 19, 2026 14:13
@vpacher vpacher changed the title docs: features entry for dock changes kept with a window resize (#5230) frontend: keep a dock change that comes with a window resize (#5230) Nov 19, 2026
@vpacher
vpacher marked this pull request as draft November 19, 2026 14:14
@vpacher
vpacher marked this pull request as ready for review November 19, 2026 14:47
@vpacher
vpacher added this pull request to the merge queue Nov 19, 2026
Merged via the queue into master with commit 81fc87b Nov 19, 2026
47 checks passed
@vpacher
vpacher deleted the fix/5230-dock-reapply branch November 19, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant