Cursor-based move formula computed position from window_w/window_h before the rule's own size directive resized the window, pushing it far past the screen edge. Compute the target position directly from the same size formula instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>