Presel feedback window stays mapped across desktop switches when single_monocle makes the desktop monocle
With single_monocle true, a preselection made on a single-window
desktop paints its feedback window, but switching to another desktop
leaves that feedback window mapped on top of everything — it survives
until the preselection is cancelled or fulfilled.
Version
bspwm -v → 0.9.12 (Debian 0.9.12-1). The code involved is
unchanged on current master.
Configuration
bspc config single_monocle true (happy to attach the full bspwmrc,
but the setting above is the relevant part).
Steps to reproduce
- Focus a desktop containing exactly one tiled window
(
single_monoclemakes its effective layout monocle). bspc node -p east— the presel feedback is drawn.bspc desktop -f <any other desktop>.
Observed: the gray feedback window remains visible on top of the newly
focused desktop (checked with xwininfo: the feedback window stays
IsViewable with the east-half geometry of the old desktop). It stays
there across further desktop switches until the presel is cancelled.
Expected: the feedback window hides together with its desktop.
Root cause
Since 342c2e3c ("Rely on the user layout to skip the presel fb",
fixing #954), draw_presel_feedback() gates on the user layout:
// src/window.c:294
if (n == NULL || n->presel == NULL || d->user_layout == LAYOUT_MONOCLE || !presel_feedback) {but hide_node() still gates on the effective layout:
// src/tree.c:693
if (n->presel != NULL && d->layout != LAYOUT_MONOCLE) {
window_hide(n->presel->feedback);
}With single_monocle on a one-window desktop, user_layout is tiled
(so the feedback is drawn) while the effective layout is monocle (so
hiding is skipped) — the window is painted by one criterion and hidden
by the other.
show_node() (src/tree.c:717) has the same effective-layout condition
and would skip re-showing a feedback that draw_presel_feedback()
considers visible, so both siblings drifted from 342c2e3c, which only
updated the draw side.
Suggested fix
Align both conditions in src/tree.c with the draw side:
if (n->presel != NULL && d->user_layout != LAYOUT_MONOCLE) {in hide_node() and show_node().
Disclosure: the analysis was assisted by an AI tool; every claim above (source inspection, reproduction, xwininfo evidence) was independently reproduced and verified on a live session before filing.
Source: baskerville/bspwm