mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 23:51:33 +00:00
Two geometry defects found while stress-testing the companion. Positioning mixed coordinate spaces. `work_area()` is physical pixels of the monitor Quick Chat is moving to, but `inner_size()` is physical pixels at the scale of the monitor it is on now. A 640pt window on a 2x display reports 1280px, so invoking it on a 1x 1920px display centred using 1280 and landed it 320px left of centre. Re-express the window size in the target monitor's scale first; equal scales give a ratio of 1, so single-monitor setups are untouched to the pixel. Widget growth resized without re-anchoring. `quickchat_set_expanded` resizes and then repositions, but the widget path only resized, keeping the old top edge. Growing from 360pt to 440pt in a 440pt work area left the bottom 80pt off-screen and unreachable. `resize_window_if_needed` now reports whether it actually changed the height so the caller re-anchors only on a real resize, rather than moving the window when nothing changed.