<feed xmlns='http://www.w3.org/2005/Atom'>
<title>srdwm/crates/core/src/manager/workspaces.rs, branch main</title>
<subtitle>Cross-platform window manager written in Rust.
</subtitle>
<id>https://srdusr.com/git/srdwm/atom?h=main</id>
<link rel='self' href='https://srdusr.com/git/srdwm/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/'/>
<updated>2025-02-15T12:56:00+00:00</updated>
<entry>
<title>Checkpoint: preserve all uncommitted rust-rewrite worktree work</title>
<updated>2025-02-15T12:56:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-02-15T12:56:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=0a4c4b5941fe982ccb3d3175e26d9d83f0025ffd'/>
<id>urn:sha1:0a4c4b5941fe982ccb3d3175e26d9d83f0025ffd</id>
<content type='text'>
Safety commit before reconciling this worktree with main, which has
diverged with its own separate fixes today. Nothing here is reviewed
or curated yet - this exists purely so none of this work can be lost
to a git operation, disk issue, or worktree cleanup while that
reconciliation happens.
</content>
</entry>
<entry>
<title>Fix workspace switches undoing themselves within milliseconds</title>
<updated>2025-02-14T19:36:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-02-14T19:36:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=413daa7ba2ea0ebd1424c024fd0566423aaea3f8'/>
<id>urn:sha1:413daa7ba2ea0ebd1424c024fd0566423aaea3f8</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Add temporary diagnostics for two live-reproduced bugs</title>
<updated>2025-02-11T12:00:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-02-11T12:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=b1d69a552cdcc7370c4befd42ef2111c8b367c46'/>
<id>urn:sha1:b1d69a552cdcc7370c4befd42ef2111c8b367c46</id>
<content type='text'>
1. A popup's xdg_popup.grab (Firefox's own right-click menu, concretely)
   receiving zero pointer input at all - no hover highlight, no click
   effect, not even dismiss-on-miss - logs whether grab_popup actually
   succeeds, since a silent failure there would explain exactly this.

2. srd dispatch activate_workspace returning {"ok":true} without ever
   changing the current workspace, confirmed via a raw socket request
   bypassing the CLI entirely. switch_workspace's own logic reads
   correct; logs its actual inputs/state to find out why the real
   process disagrees with it.

Remove once both are resolved.
</content>
</entry>
<entry>
<title>Fix a misleading workspace comment and drop four dead config keys</title>
<updated>2024-08-09T07:36:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2024-08-09T07:36:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=31de54096243fb000fa6e7008a914861293482a5'/>
<id>urn:sha1:31de54096243fb000fa6e7008a914861293482a5</id>
<content type='text'>
visible_windows' doc comment claimed windows show "on the active
workspace of whichever monitor they're assigned to" - the code never
reads w.monitor at all; current_workspace is one flat value shared by
every monitor, not per-output. Documented that explicitly on both the
field and the method, since this is a real behavioral difference from
Hyprland worth a reader actually seeing, not just an inaccurate comment
to fix quietly.

monitor.primary_workspace/monitor.workspace_count describe a per-
monitor-workspace design that doesn't exist; workspace.auto_switch/
workspace.persistent were never wired to any behavior. All four were
seeded into default_config() and documented in DEFAULTS.md, so
srd.set()/srd.get() on them silently succeeded while doing nothing --
removed from both, matching the precedent already set by general.
rounded_corners' deliberate absence from default_config for a
different reason (backend-dependent default rather than unbuilt).
</content>
</entry>
<entry>
<title>Split crates/core/src/manager.rs (2048 lines) into manager/</title>
<updated>2024-07-11T12:17:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2024-07-11T12:17:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=86b557a6c0baa4146b30712d8b7633f1b9b46d43'/>
<id>urn:sha1:86b557a6c0baa4146b30712d8b7633f1b9b46d43</id>
<content type='text'>
Pure reorganization, no behavior change - verified by diffing the
function-name set before/after (identical 130 functions) plus a full
cargo test pass. WindowManager's struct/field definitions, Default,
new(), and the three trivial constructors (add_rule/register_layout/
available_layouts) stay in mod.rs; the rest of the single ~950-line
impl block is split into one file per the section comments the file
already had (monitors, windows, focus, winops, hittest, dragresize,
workspaces, layout). Three methods called across section boundaries
(monitor_for, windows_on_workspace, cycle_focus) went from private to
pub(super) - Rust's privacy model doesn't let sibling submodules see
each other's private items, only a defining module's own descendants.

The ~1000-line test module moves to manager/tests.rs unsplit: its
helpers (wm_with_monitor, two_monitors, monitor_with_dock) are shared
across tests for every section, so splitting further would mean
duplicating them or adding another shared-support file for little
benefit.
</content>
</entry>
</feed>
