Repository navigation
Test: Drive live Linux size hints from the Host (FR-53, #407) - #828
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_windowinrenderer/linux/test/LinuxMultiWindowTest.kt.The Host sets
WindowResizableandWindowMinSizeon aWindownode that is already open, as frames throughRecordingHost.WindowManagercarries them to the X window, and the test readsWM_NORMAL_HINTSback 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.setResizableandsetMinimumSizeitself, so it covers the backend and the fork'sX11Window. No test on develop, on any platform, covers the step before it:WindowManager.applyChangespassing a changedWindowResizableon toPlatformWindow.setResizable. If that line went away, every test would stay green and a liveResizablechange would do nothing again.Where it came from
feat/fr53-linux-live-size-c-crhad one commit, 317a271, with two parts:LinuxPlatformWindow.setResizableforwarding tox11.setResizable: on develop already, from Fix: Live Linux size hints and GraalVM Windows window from the fork (#407, #69) #614 (f390f15).fr53_linux_resizable_and_min_size_update_wm_normal_hints_after_open: not on develop. The closing comment on Feat: Linux live size hints (needs fork PR #179 pin first) (FR-53, #407) #449 says it was not carried over.The old test does not apply to today's file (it conflicts, and it brought its own
ScriptedHost,setWindowandfloatshelpers that the file now has asRecordingHostandbytesOf), 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:
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 therun-heavy-cilabel or a manual dispatch.DISPLAY, and fails underCIif there is none).Things a reviewer should look at, since nothing was compiled:
backend.turn(), as the direct test does. Here the window is opened byWindowManager.attach()instead ofbackend.open.Resizable = falsein one frame, in the orderapplyChangesapplies them (minimum size, then resizable), which is the order the direct test uses.