Skip to content

Test: Drive live Linux size hints from the Host (FR-53, #407) - #828

Merged
b-re-w merged 1 commit into
developfrom
feat/407-linux-live-hints-host-test
Nov 15, 2026
Merged

b-re-w merged 1 commit into
developfrom
feat/407-linux-live-hints-host-test

Conversation

@b-re-w

@b-re-w b-re-w commented Nov 15, 2026

Copy link
Copy Markdown
Member

Refs #407. Follows #614. Replaces what was left on feat/fr53-linux-live-size-c-cr (closed PR #449).

What it is

One test, no production code: fr53_linux_resizable_and_minimum_size_set_by_the_host_change_the_size_hints_of_an_open_window in renderer/linux/test/LinuxMultiWindowTest.kt.

The Host sets WindowResizable and WindowMinSize on a Window node that is already open, as frames through RecordingHost. WindowManager carries them to the X window, and the test reads WM_NORMAL_HINTS back from the X server. The assertions are the same three steps as the existing direct test (fixed window: maximum set and equal to minimum; resizable with 120x90: minimum set, maximum cleared; minimum 0x0: both cleared).

Why

#407 is done when "changing Resizable on a live Window node changes what the window manager allows". The test #614 merged calls LinuxPlatformWindow.setResizable and setMinimumSize itself, so it covers the backend and the fork's X11Window. No test on develop, on any platform, covers the step before it: WindowManager.applyChanges passing a changed WindowResizable on to PlatformWindow.setResizable. If that line went away, every test would stay green and a live Resizable change would do nothing again.

Where it came from

feat/fr53-linux-live-size-c-cr had one commit, 317a271, with two parts:

The old test does not apply to today's file (it conflicts, and it brought its own ScriptedHost, setWindow and floats helpers that the file now has as RecordingHost and bytesOf), so it is written again here with the file's own helpers. After this, the old branch holds nothing develop lacks.

Not built, not tested

I did not compile or run this. The linux module builds only on Linux. A builder or CI must run:

  • the "Kotlin/Native desktop test" workflow (test-kn-desktop-renderer.yml) on this head, Linux leg, which runs the linux module's tests under Xvfb. It is a heavy workflow, so it needs the run-heavy-ci label or a manual dispatch.
  • Check in that leg's log that the new test ran and was not skipped (it returns early without DISPLAY, and fails under CI if there is none).

Things a reviewer should look at, since nothing was compiled:

  • The test reads the hints of the drawable that is current after backend.turn(), as the direct test does. Here the window is opened by WindowManager.attach() instead of backend.open.
  • The first step sets the minimum size and Resizable = false in one frame, in the order applyChanges applies them (minimum size, then resizable), which is the order the direct test uses.

The Linux test for #407 calls LinuxPlatformWindow.setResizable and
setMinimumSize itself. Nothing checks the step before it: that a change of
WindowResizable or WindowMinSize on an open Window node reaches the platform
window through WindowManager. That step is what #407 asks for ("changing
Resizable on a live Window node changes what the window manager allows").

This adds the Host-driven test that closed PR #449 carried
(feat/fr53-linux-live-size-c-cr) and #614 left out, written again on today's
test file: it uses RecordingHost and bytesOf, sends the changes as frames, and
reads WM_NORMAL_HINTS back from the X server with the same assertions as the
direct test. No production code changes; the production line of #449 reached
develop in #614 (f390f15).

Not built or run locally. The linux module compiles and runs only on the Linux
leg of the Kotlin/Native desktop workflow.
@b-re-w
b-re-w merged commit 2941803 into develop Nov 15, 2026
@b-re-w
b-re-w deleted the feat/407-linux-live-hints-host-test branch November 15, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant