RFR: 8351357: Add canary system test checking if Stage receives focus on show [v4]
Lukasz Kostyra
lkostyra at openjdk.org
Wed Jul 2 06:49:51 UTC 2025
On Tue, 1 Jul 2025 15:11:06 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> The most reliable way would be to probably scan the whole grid, I agree... I could change this - the stage is not that big after all. Maybe even turn the stage to undecorated to make this more reliable across platforms. I expect the very edge of the Stage to be not exactly the same color, but if we leave ex. 1px margin around the edges it should still be fine. I'll play around with this and update soon.
>
> I thought about that too - but why wouldn't the client area, the scene itself, be of different color? The decorations and possible effects should be outside of the stage, shouldn't they?
Turning the scene to undecorated would just make the math easier, without having to count in the window decorations which almost certainly would be of different color.
As for the margin thing, I had to do a bit of history searching and I came back with this old PR: https://github.com/openjdk/jfx/pull/1242
I think when writing the above my blurry memory had to recall to one of the attempts at solving this which involved just skipping the 1px margin of the Stage on HiDPI systems. I agree, it should be fine just going through the entire Stage.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1804#discussion_r2179255898
More information about the openjfx-dev
mailing list