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
- Use river (notion-river) tiling window manager on Wayland
- Open contour in a tiled workspace
- The terminal opens with an incorrect initial size — too small for the allocated space
- 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
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:
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
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
Related Issues / PRs
implicitWidth/Heightto comparing against saved_lastVirtualWidth/Heightvalues. On river, the initial window dimensions might not match the saved stale dimensions either, or the timing differs.Investigation Notes
PR #1904 saved the pre-DPR-correction window dimensions (
_lastVirtualWidth/_lastVirtualHeight) increateRenderer()and then insizeChanged()checks if the compositor reverted to those stale dimensions. If the compositor (river) assigns a new tile size aftercreateRenderer()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 atlasscreen-state-dump.vt— full screen state dump