srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/legacy-cpp/docs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-02-14 21:36:00 +0200
committersrdusr <[email protected]>2025-02-14 21:36:00 +0200
commit413daa7ba2ea0ebd1424c024fd0566423aaea3f8 (patch)
tree90c1de1b29052201af7b499ce6a9f60e72ec2598 /legacy-cpp/docs
parented0b8ecf6c08d920ffd1b52c9dc6a24a436ce977 (diff)
downloadsrdwm-413daa7ba2ea0ebd1424c024fd0566423aaea3f8.tar.gz
srdwm-413daa7ba2ea0ebd1424c024fd0566423aaea3f8.zip
Fix workspace switches undoing themselves within milliseconds
sync()'s per-tick platform.focus(id) re-assertion (added to keep real Wayland/X11 keyboard focus following core's own bookkeeping) ran unconditionally on every dirty tick, including when nothing about focus had actually changed. focus_window (core) has its own, separate side effect of switching to the focused window's workspace when it differs from the current one - correct when focus genuinely moves to a window on another workspace, but this call was never gated on focus having changed at all: switching workspace via activate_workspace left the still-focused window's own workspace field untouched, so the very next dirty tick's blind re-assertion of that same focus saw a mismatch against the just-changed current_workspace and switched straight back. Confirmed live via temporary core-side logging: two switch_workspace calls a few milliseconds apart, the second one undoing the first every single time, for every workspace switch that didn't also change which window was focused. Gated the re-assertion on the focused id actually changing since the last sync() call. Real focus-follows-real-platform-focus still happens on every genuine change, which is all the original fix needed.
Diffstat (limited to 'legacy-cpp/docs')
0 files changed, 0 insertions, 0 deletions