The purpose of this test is to determine the validity of the solution to the problem detailed in Pull Request #4945 . The test is between raylib's master branch and moros1138's raylib fork, the source of the pull request, which contains the proposed solution to the problem presented in the pull request. Our test subject will be rguilayout which, in early independent tests, demonstrated abnormalities I couldn't explain. This test is the exploration and explanation of those abnormalities and to determine whether they are the result of a flaw in the proposed resize or a flaw in rguilayout.
Pre-fix clones raylib master branch, unmodified, and rguilayout with some modifications to make sure it builds. the Makefile for rguilayout assumes a windows host and overwrites crucial environment variables with values that do not make sense for linux. Is simple patch and doesn't change the outcome of the test.
Post-fix clones raylib from moros1138 master branch, containing a fix for the resize handler which solves the mouse desync issues in resizable windows. rguilayout needs 2 modifications.
The addition of the following CSS styles:
html, body { width: 100%; height: 100%; }
And commenting out the line 324 of rguilayout.c which contains the following function call:
SetWindowMinSize(1280, 720);
On a 1080p monitor with pre and post side-by-side, aside from the layout having a minimum size which prevent it from rendering UI elements on the right size of the screen both the pre and post fix appear functionally identical. The mouse tracks properly in both versions. The fixed version appears to resize as it should. I speculate that if I removed the minimum size on the pre-fix it would function identically to the fixed version.
At first glance, it's very much the same obersvations as for version 3.1.56. Things get interesting however when you start moving the mouse. The pre-fix version's mouse reporting off. In the side-by-side, however it was only off on the Y axis, the X axis seemed unaffected in the side-by-side.
The post-fix version however matched functionality with the post-fix version of 3.1.56.
It is my opinion that the cause of the abnormalities in early testing was due to the use of a minimum size in combination with an emscripten shell which hid scrollbars. This caused rendering problems in rguilayout that had yet to be explained. The abnormalities were not a result of the proposed resize solution and should not be a reason to block it's adoption.
I leave it to the reader to expand on the tests to see what other ways the fix might be broken. I'll leave these compiled examples up for the duration of the review in the hopes that it's useful in making a decision.