Repository navigation
docking: Keep intellihide target box in sync with slider allocation - #2653
Merged
Merged
Conversation
3v1n0
force-pushed
the
fix/intellihide-stale-target-box
branch
from
July 25, 2026 00:00
89c92d0 to
43f315c
Compare
Keep the intellihide target box in sync when layout allocates the centered slider, so windows tiled on the right correctly cause the dock to dodge. The slider position can also change through layout-driven (re-)allocation (e.g. the ActorAlign.CENTER centering), which does not emit notify::x/y, leaving the intellihide target box stale. Allocation changes now happens also on x/y changes, so we do not need to cover it twice Co-Authored-By: Marco Trevisan (Treviño) <mail@3v1n0.net> Closes: ubuntu#2413
3v1n0
force-pushed
the
fix/intellihide-stale-target-box
branch
from
July 25, 2026 00:01
43f315c to
b971925
Compare
Collaborator
|
Ok, I've changed it a bit, let's see how this goes! |
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.
Summary
This fixes the issue where, with intelligent autohide enabled and the dock centered at the bottom, the dock does not dodge windows tiled to the right half of the screen, while windows tiled to the left half work fine.
Closes #2413
Root cause
_updateStaticBox()computes the intellihide target box fromthis.x + this._slider.x. The slide container is centered inside the dock actor withActorAlign.CENTER, so its final x offset is assigned by the layout machinery during allocation. Layout driven allocation changes do not emitnotify::x(that signal is only emitted for explicit position changes), and the recomputation is currently only wired tonotify::x/notify::yon the slider and tonotify::allocationon the dash container. In practice the last recomputation can run while the slider still sits at x = 0, and the target box then stays anchored to the left edge of the dock actor.Measured on an affected setup (GNOME Shell 50.3, extension v105, 3440x1440, bottom centered dock) by inspecting the running shell:
A window tiled to the left half still overlaps the stale box by accident, so the dock hides and everything looks fine. A window tiled to the right half starts at x = 1728, which is past the stale x2 = 1667, so no overlap is ever detected and the dock stays on top of the window. This matches the observations from @PixelcrafterEXE and @howl in the issue thread that the detection area behaves as if the dock started at the left edge of the screen. Users running the dock in panel mode never see the problem because the slider offset is genuinely 0 there.
Why not get_transformed_position()
I am aware this was already attempted in #2447, which read the position from
this._box.get_transformed_position(). That method reflects the current visual position, including the slide animation, so the target box followed the dock while it was hiding and could end up off screen, causing the regressions tracked in #2501, and the change was then reverted in #2524.This patch instead keeps the original, animation independent computation and only fixes the missing trigger: it additionally connects
_updateStaticBoxtonotify::allocationon the slide container, so the box is recomputed whenever the layout repositions the slider. During the slide animation the recomputed values do not change, because the animation alters the slider size through its preferred size while the centering offset and the dock position stay constant, so the target box keeps pointing at the shown position of the dock and the #2501 regression is not reintroduced.Testing
Verified on the affected setup above (live patching the running shell with the same signal connection):
Thanks a lot for maintaining this extension, and thanks to everyone in the issue thread whose reports helped narrow this down.
Generated with Claude Code