Regression: windows not centered after exiting fullscreen in scrolling layout (since 96de3464)
#15206
Replies: 3 comments 2 replies
|
Consider: 0.5 | 0.8 --> 0.5 | FS unFS action is more the restoration of state, so it shouldn't move viewport imo. Especially since it's possible to dispatch FS states to windows that aren't what you are focused on. The real bug is the fact that it shifts left by a few pixels. This also happened if you FS and unFSed a window pre 0.55 (scroll FS added) - the viewport would shift by a few pixels though it shouldn't have. I've added this as a bug to be fixed in #14705. Please help test when it's ready |
|
This is still an issue in v56.0, unfullscreening a window leaves it stuck to the right side. 2026-07-23.12-06-03.mp4 |
Uh oh!
There was an error while loading. Please reload this page.
Hyprland version
Hyprland 0.55.0 built from branch upstream_main at commit 5a7078d dirty (internal: fix bugs revealed by hu update).
Regression
yes
Describe the bug
Since commit 96de346, after entering and then exiting fullscreen, the window does not fully center β it is offset to the left by a few pixels.
I found this issue in a build from the Git repository. Meanwhile, in my test, the 0.55.4 tagged release does not have this problem. I then manually performed a binary search by checking out various commits and building/testing each one to determine when the issue first appeared.
Commit
96de3464splitRECALCULATE_REASON_TOGGLE_FULLSCREENintoTOGGLE_DEFAULT_HANDLED_FULLSCREENandTOGGLE_LAYOUT_HANDLED_FULLSCREEN, and added both to the soft-recalculate list inisHardRecalculateReason. This was intentional β entering fullscreen already callscenterOrFitColexplicitly inrequestFullscreen, so a hard recalculate would be redundant.However, exiting fullscreen goes through a different path:
requestFullscreen(FSMODE_NONE)-> callsclearFullscreenTarget-> restores the column width fromrestoreColumnWidth, but does not callcenterOrFitColCSpace::setFullscreenthen callsrecalculate(TOGGLE_LAYOUT_HANDLED_FULLSCREEN), which is soft. So the ScrollingAlgorithm does not scroll the viewportBefore the commit,
recalculate()was called withRECALCULATE_REASON_UNKNOWN(hard), which masked this gap by forcefully scrolling the viewport on every recalculate.I fixed it by adding
centerOrFitColinclearFullscreenTargetafter restoring the column width:This mirrors what
requestFullscreen(FSMODE_FULLSCREEN)already does on the enter path (lines 1041/1045).Reproduction steps
hl.dsp.window.fullscreenorhl.dsp.window.fullscreen_stateSystem info and config
hyprctl.txt
All reactions