Fix invisible click barrier when dock is hidden on X11 - #342
Conversation
The dock container is a full-width chrome actor that keeps its size when the dock slides out. Since it is tracked with affectsInputRegion defaulting to true, its whole rect stays in the shell's X11 stage input region even while hidden, so clicks in the bottom band of the screen never reach the application windows underneath (icedman#317). Wayland ignores the stage input region, which is why this only shows up on X11. Register the container with affectsInputRegion: false. Clicks on the visible dock are already handled through the struts actor, and the 2px dwell strip still reveals the dock at the edge.
|
Heads up on one edge case, since I hit this same bug and landed on your diagnosis independently — the container/ The one gap: this fix relies on if (dock.extension.autohide_dash) {
dock.struts.x = dock._background.x + dock._monitor.x;
dock.struts.width = dock._background.width;
}With autohide disabled that branch never runs, I've opened #356 with the |
Fixes #317
Symptom
With autohide enabled on X11, clicks in the bottom band of the screen (roughly the dock's height, full monitor width) never reach the application window underneath while the dock is hidden — e.g. the VS Code status bar or a terminal's last lines become unclickable.
Root cause
The dock container (
dashtodockContainer) is a chrome actor sized to the full monitor width and the dock's height, and it keeps that size when the dock slides out — only the inner dash is translated off-screen andstrutsis hidden. Because the container is registered viaMain.layoutManager.addChrome()withaffectsInputRegionleft at its default (true), its whole rect stays in the shell's X11 stage input region permanently. Clicks landing there are delivered to the shell stage (where nothing reactive remains once the dash slides away) instead of the window below.Wayland ignores the stage input region, which is why this only reproduces on X11.
Fix
Register the container with
affectsInputRegion: false(the line was already present, commented out). Input for the visible dock is already carried by thestrutsactor (which is explicitly input-region-tracked and hidden together with the dock), and the 2pxdwellstrip still reveals the dock at the screen edge.Verification
On Ubuntu 24.04, GNOME Shell 46, X11, extension v92, dock at bottom, autohide + dodge enabled:
xevwindow placed in the bottom zone were swallowed — 0ButtonPressevents received for any click within ~190px of the bottom edge; clicks above that boundary passed. The boundary matches the container height (iconSize*2 + iconSize*0.6*(1+magnify)).ButtonPress). The dock still reveals via the edge dwell strip, icons stay clickable, and hiding/dodging behaves as before.