<feed xmlns='http://www.w3.org/2005/Atom'>
<title>srdwm/crates/core/src/manager/input_pin.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-11-07T12:04:00+00:00</updated>
<entry>
<title>Make tiling's master/stack ratio live, add settings readback everywhere</title>
<updated>2025-11-07T12:04:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-11-07T12:04:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=ea78f94027ecd2c690904a6d7729e9e3cc190a20'/>
<id>urn:sha1:ea78f94027ecd2c690904a6d7729e9e3cc190a20</id>
<content type='text'>
Investigated the "tiling needs a lot of work" report directly. The
MasterStackLayout algorithm itself was already correct; the real gap was
that dragging or resizing a tiled window did nothing durable (raw
geometry that the next arrange_workspace silently discarded), and
master_ratio/master_count had no live path at all (config-file only).

A resize-drag on the shared master/stack boundary now live-adjusts
TilingConfig::master_ratio and re-arranges the group immediately; srd set
master_ratio/master_count do the same for a keybind or script. Found and
fixed a real bug while building this: start_resize's own focus_window
call re-stacks its target in self.order before the ratio-drag decision
used to be made, silently misclassifying real master-column grabs.
Fixed by deciding ratio-drag status (and freezing the membership
snapshot it depends on) before that raise happens, applying
MasterStackLayout directly against the frozen snapshot rather than
re-deriving membership from the by-then-reordered live order. Live-
verified in a nested compositor, not just unit-tested.

Also closes the readback gaps flagged directly by the AGS peer session:
border_width/border_color/corner_radius/decoration_mode/gap_inner/
gap_outer/master_ratio/master_count were all live-settable via srd set
with no way to read the current value back, and pin_input had no
readback at all. SettingsResponse now reports all of them; a new
pinned_inputs query (srd pinned inputs) lists every currently pinned
pid/window.
</content>
</entry>
<entry>
<title>Core window manager: real fixes plus three new rule/placement primitives</title>
<updated>2025-08-29T20:42:00+00:00</updated>
<author>
<name>srdusr</name>
<email>99972264+srdusr@users.noreply.github.com</email>
</author>
<published>2025-08-29T20:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://srdusr.com/git/srdwm/commit/?id=be5c4efa6866b5d23e1e81ecfc3b8d276540860f'/>
<id>urn:sha1:be5c4efa6866b5d23e1e81ecfc3b8d276540860f</id>
<content type='text'>
Several independent, real pieces landed in crates/core this shift - see
docs/TODO.md for each one's full root-cause/verification narrative:

- "Primary" monitor is now picked by which head sits at physical (0, 0)
  (the user's own configured anchor), not whichever connector DRM
  happened to probe first - fixes desktop icons and new-window placement
  landing on the wrong monitor depending on hotplug/probe order.
- A new window's target monitor now prioritizes the pointer's own current
  monitor over the last-focused window's monitor, which goes stale the
  moment the user's attention moves to empty desktop, a panel, or a dock.
- aspect_ratio window-rule action ("W:H") plus ResizeEdge::apply_aspect_
  ratio: holds a floating window's aspect ratio through an interactive
  resize. The real, scoped "phone monitor" primitive - matches any VM/
  emulator/scrcpy window by app_id, nothing Android- or VM-specific here.
- general.phone_mode (WindowManager::phone_mode): a new window defaults
  to maximized instead of floating/tiled small, unless a rule explicitly
  floats it or sets maximized - the one placement default a phone-shaped
  screen actually needs. Exposed read-only via IPC so a shell panel can
  adapt its own chrome to the same signal.
- input_pin.rs: the core half of pinning a virtual pointer to a specific
  window (Multi-cursor Phase 2) - a backend-agnostic request queue,
  same cross-boundary shape output_position_requests/lock_requested
  already use, since core has no real Wayland protocol object to reach
  into itself.

Full workspace test suite covers all of the above (aspect-ratio resize
math for every edge case, phone-mode default-vs-rule-override behavior,
the pin-input request queue, the monitor-picking fixes).
</content>
</entry>
</feed>
