<feed xmlns='http://www.w3.org/2005/Atom'>
<title>srdwm/crates/core/src/manager/focus.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>2026-08-25T12:49:00+00:00</updated>
<entry>
<title>Move a window in steps, and let the keyboard resize one at all</title>
<updated>2026-08-25T12:49:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2026-08-25T12:49:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=8b3ef3c7b28570122126a1c8b3d6695fc3647557'/>
<id>urn:sha1:8b3ef3c7b28570122126a1c8b3d6695fc3647557</id>
<content type='text'>
Two of the owner's reported gaps, both about moving a window without a
mouse.

Super+Shift+HJKL slammed the window to the far edge of the monitor in one
press: "it should move in increments - one side, middle, other side - not
just extreme left/up/right/down". It now steps an eighth of the monitor per
press, which crosses the screen in eight, passes through the middle at the
fourth, and stops flush against the edge rather than short of it. A
fraction rather than a pixel count, so the same key feels the same on a
laptop panel and a 4K display.

Only outside a tiling layout. There a window does not own its geometry --
stepping it would be undone by the next arrange - so the neighbour swap
stays, and three tests that assumed swapping on a dynamic workspace now say
which layout they mean.

Keyboard resize did not exist. Super+right-drag has resized with the mouse
for a while, which is why this went unnoticed, but nothing resized a window
without one. `srd.window.resize("right", "grow"|"shrink")` grows or shrinks
from the far edge in that direction, leaving the top-left where it is, and
is bounded by the same minimums a drag is and by the monitor's usable area
- a window can be resized neither to nothing nor off the screen, and a
test holds each key down forty times to prove it.

Wired into the owner's config: Super+Ctrl+arrows resize (the arrow says
which way the far edge moves, so Right always widens), and Super+Ctrl+L
locks the screen. Hyprland only ever bound the lock to XF86ScreenSaver,
which most keyboards do not have; Super+L is the convention everywhere else
but is already focus-right here. Ctrl+arrows rather than Ctrl+HJKL because
Super+Ctrl+K is already kill-process.

Verified through the real path in a nested compositor running that config:
89 bindings, all 89 described, the five new ones registered.
</content>
</entry>
<entry>
<title>Fix focusing a minimized window not restoring it</title>
<updated>2025-02-03T18:15:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-02-03T18:15:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=dae1617a8b7ee7c40beb452046c5ec84e69931ee'/>
<id>urn:sha1:dae1617a8b7ee7c40beb452046c5ec84e69931ee</id>
<content type='text'>
focus_window marked the target focused without clearing minimized, so
a dock icon's Activate (or the plain "focus" IPC command) on a
minimized window left it focused but still excluded from
visible_windows/rendering - reads exactly like the click did nothing,
since the window never actually reappears. Every focus_window caller
gets the restore for free now. Added a Super+n keybind for minimize
too, since none existed at all before this.
</content>
</entry>
<entry>
<title>Accumulate core-crate additions: capture requests, focus/workspace fixes, test coverage</title>
<updated>2024-11-30T21:03:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2024-11-30T21:03:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=583063c3094ca0cf9f6cceba92d710b238547f6b'/>
<id>urn:sha1:583063c3094ca0cf9f6cceba92d710b238547f6b</id>
<content type='text'>
Bundles several related changes to crates/core built up over this
session rather than committed incrementally:
- WindowManager::request_capture_workspace/drain_capture_requests (new
  manager/capture.rs) - backend-agnostic queuing for an off-screen
  workspace render, see the wayland-side commit for why this exists.
- focus_window now switches workspace as a side effect when the target
  isn't on the current one, matching Hyprland's focuswindow convention
  (manager/focus.rs).
- Assorted window/rules/theme field additions and their test coverage.

Left less granular than the repo's usual one-purpose-per-commit
convention deliberately: these accumulated across a long session
without being committed as they landed, and are too entangled
line-by-line to safely split apart now without risking mis-attributing
changes to the wrong commit message.
</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>
