On Tue, 22 Nov 2022 01:40:02 GMT, Thiago Milczarek Sayao <tsa...@openjdk.org> 
wrote:

>> This cleans size and positioning code, reducing special cases, code 
>> complexity and size.
>> 
>> Changes:
>> 
>> - cached extents: 28, 1, 1, 1 are old defaults - modern gnome uses different 
>> sizes. It does not assume any size because it varies - it does cache because 
>> it's unlikely to vary on the same system - but if it does occur, it will 
>> only waste a resize event.
>> - window geometry, min/max size are centralized in 
>> `update_window_constraints`;
>> - Frame extents (the window decoration size used for "total window size"):
>>     - frame extents are received in `process_property_notify`;
>>     - removed quirks in java code;
>>     - When received, call `set_bounds` again to adjust the size (to account 
>> decorations later received);
>> - Removed `activate_window` because it's the same as focusing the window. 
>> `gtk_window_present` will deiconify and focus it.
>> - `ensure_window_size` was a quirk - removed;
>> - `requested_bounds` removed - not used anymore;
>> - `window_configure` incorporated in `set_bounds` with `gtk_window_move` and 
>> `gtk_window_resize`;
>> - `process_net_wm_property` is a work-around for Unity only (added a check 
>> if Unity - but it can probably be removed at some point)
>> - `restack` split in `to_front()` and `to_back()` to conform to managed code;
>> - Set `gtk_window_set_focus_on_map` to FALSE because if TRUE the Window 
>> Manager changes the window ordering in the "focus stealing" mechanism - this 
>> makes possible to remove the quirk on `request_focus()`;
>> - Note:  `geometry_get_*` and `geometry_set_*` moved location but unchanged.
>
> Thiago Milczarek Sayao has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Fix View position

I'm starting to test this, and have asked a couple others to do the same.

I ran the automated tests on Ubuntu 16.04 (yes, I know it's an old system) 
using the default GTK3 library, and I consistently get 16 unit test failures. 
Based on the error messages, it looks related to focus. We'll report results on 
other versions of Linux as they come in. We'll also do some manual testing.

__Platform: Ubuntu 16.04__


$ gradle --info -PFULL_TEST=true -PUSE_ROBOT=true sdk :systemTests:test

...

SwingNodeScaleTest > initializationError FAILED
    java.lang.AssertionError: Failed to launch FX application class 
test.javafx.embed.swing.SwingNodeScaleTest$MyApp within 50 sec.
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at test.util.Util.launch(Util.java:350)
        at 
test.javafx.embed.swing.SwingNodeScaleTest.setupOnce(SwingNodeScaleTest.java:67)

RestoreSceneSizeTest > testUnfullscreenSize FAILED
    java.lang.AssertionError: Scene got wrong width expected:<234.0> but 
was:<1855.0>
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.failNotEquals(Assert.java:835)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at 
test.javafx.scene.RestoreSceneSizeTest.testUnfullscreenSize(RestoreSceneSizeTest.java:127)

CanvasTest > testCanvasRect FAILED
    java.lang.AssertionError: Timeout when waiting for focus change 
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at test.javafx.scene.web.CanvasTest.testCanvasRect(CanvasTest.java:128)

HTMLEditorTest > checkStyleWithCSS FAILED
    java.lang.AssertionError: Timeout when waiting for focus change 
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at 
test.javafx.scene.web.HTMLEditorTest.checkStyleWithCSS(HTMLEditorTest.java:222)

HTMLEditorTest > selectFontFamilyWithSpace FAILED
    java.lang.AssertionError: Timeout when waiting for focus change 
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at 
test.javafx.scene.web.HTMLEditorTest.selectFontFamilyWithSpace(HTMLEditorTest.java:355)

HTMLEditorTest > checkFontSizeOnSelectAll_Shift_LeftArrowKey FAILED
    java.lang.AssertionError: Timeout while waiting for test html text setup
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at 
test.javafx.scene.web.HTMLEditorTest.checkFontSizeOnSelectAll_Shift_LeftArrowKey(HTMLEditorTest.java:448)

HTMLEditorTest > checkFontSizeOnSelectAll_ctrl_A FAILED
    java.lang.AssertionError: Timeout while waiting for test html text setup
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at 
test.javafx.scene.web.HTMLEditorTest.checkFontSizeOnSelectAll_ctrl_A(HTMLEditorTest.java:398)

HTMLEditorTest > checkStyleProperty FAILED
    java.lang.AssertionError: Timeout when waiting for focus change 
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at 
test.javafx.scene.web.HTMLEditorTest.checkStyleProperty(HTMLEditorTest.java:305)

PageFillTest > testPageFillRendering FAILED
    java.lang.AssertionError: Timeout when waiting for focus change 
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at 
test.javafx.scene.web.PageFillTest.testPageFillRendering(PageFillTest.java:159)

SVGTest > testSVGRenderingWithPattern FAILED
    java.lang.AssertionError: Timeout when waiting for focus change 
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at 
test.javafx.scene.web.SVGTest.testSVGRenderingWithPattern(SVGTest.java:134)

WebPageTest > testScroll FAILED
    java.lang.AssertionError: Timeout when waiting for focus change 
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at test.javafx.scene.web.WebPageTest.testScroll(WebPageTest.java:134)

CheckWindowOrderTest > topWindowShouldBeTheLast FAILED
    java.lang.AssertionError: Last Window Should be Focused
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at 
test.robot.javafx.stage.CheckWindowOrderTest.topWindowShouldBeTheLast(CheckWindowOrderTest.java:57)

IconifyTest > canIconifyDecoratedStage FAILED
    junit.framework.AssertionFailedError: expected:rgba(255,0,0,255) but 
was:rgba(248,247,247,255)
        at 
test.robot.testharness.VisualTestBase.assertColorEquals(VisualTestBase.java:173)
        at 
test.robot.javafx.stage.IconifyTest.lambda$canIconifyStage$4(IconifyTest.java:97)

IconifyTest > canIconifyTransparentStage FAILED
    junit.framework.AssertionFailedError: expected:rgba(255,0,0,255) but 
was:rgba(0,255,0,255)
        at 
test.robot.testharness.VisualTestBase.assertColorEquals(VisualTestBase.java:173)
        at 
test.robot.javafx.stage.IconifyTest.lambda$canIconifyStage$4(IconifyTest.java:97)

IconifyTest > canIconifyUndecoratedStage FAILED
    java.lang.AssertionError
        at org.junit.Assert.fail(Assert.java:87)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at org.junit.Assert.assertFalse(Assert.java:65)
        at org.junit.Assert.assertFalse(Assert.java:75)
        at 
test.robot.javafx.stage.IconifyTest.lambda$canIconifyStage$8(IconifyTest.java:117)

IconifyTest > canIconifyNonResizableStage FAILED
    java.lang.AssertionError
        at org.junit.Assert.fail(Assert.java:87)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at org.junit.Assert.assertFalse(Assert.java:65)
        at org.junit.Assert.assertFalse(Assert.java:75)
        at 
test.robot.javafx.stage.IconifyTest.lambda$canIconifyStage$8(IconifyTest.java:117)

-------------

PR: https://git.openjdk.org/jfx/pull/915

Reply via email to