Skip to content

Initial window size incorrect with river (notion-river) tiling WM — input bar off-screen #1941

@Marenz

Description

@Marenz

Description

When using a tiling window manager (river/notion-river), the contour terminal window initially has the wrong size for the cell it is assigned to by the compositor. The window seems to get progressively smaller as the WM adjusts its size.

For example, after being triggered, the dumps show a progressive shrinking:

  • First dump: 153x52
  • Second dump: 124x33
  • Third dump: 94x25

The last size (94x25) is so small that the input prompt line (cursor at line 24/25) is barely visible or the input bar is pushed off-screen.

I can only see the input bar again after resizing the terminal manually (e.g., switching to another window and back).

Steps to Reproduce

  1. Use river (notion-river) tiling window manager on Wayland
  2. Open contour in a tiled workspace
  3. The terminal opens with an incorrect initial size — too small for the allocated space
  4. The cursor/prompt ends up at the very bottom (line 24 of 25), making input difficult or impossible to see

Expected Behavior

The terminal should immediately adopt the size assigned by the tiling WM, not require a focus switch to resize correctly.

Actual Behavior

The window opens too small, and the resize only happens after switching focus away and back.

Additional Context

  • Contour version: 0.7.0-master-a38ae102 (commit a38ae10, built from source/package)
  • Window Manager: river (notion-river) on Wayland
  • Shell: zsh (with custom prompt showing on last line)
  • Screenshots & dump attached

Related Issues / PRs

Investigation Notes

PR #1904 saved the pre-DPR-correction window dimensions (_lastVirtualWidth/_lastVirtualHeight) in createRenderer() and then in sizeChanged() checks if the compositor reverted to those stale dimensions. If the compositor (river) assigns a new tile size after createRenderer() but before the stale-dimension revert, the check might not trigger, leaving the window at the WM-assigned tile size rather than correcting to the implicit size. Alternatively, river might not trigger the revert pattern that Hyprland does, meaning the fix doesn't apply at all.

Attachments

  • screenshot.png — screenshot at time of failure (94x25, very small)
  • texture-atlas-rgba.png — texture atlas
  • screen-state-dump.vt — full screen state dump

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions