[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: JDK-8222209: Repaint properly when JFXPanel moves to another screen
From:       Kevin Rushforth <kcr () openjdk ! org>
Date:       2023-07-29 15:15:44
Message-ID: AFHSrOj1PLdwKaI4JRPf6MW921Wpgkdgg_i78sMhGpA=.cadaa357-c1a0-4b8a-a34c-15ce72cf20d6 () github ! com
[Download RAW message or body]

On Fri, 28 Jul 2023 09:26:35 GMT, John Hendrikx <jhendrikx@openjdk.org> wrote:

> Alternative fix for JFXPanel issues.
> 
> I added an extra line to **really** trigger the repainting in `EmbeddedScene`.  \
> This was inspired by this code in `GlassWindowEventHandler` which reacts to \
> `WindowEvent.RESCALE`.  It not only calls `entireSceneNeedsRepaint` but also \
> `updateSceneState`.  Snippet: 
> case WindowEvent.RESCALE: {
> float outScaleX = window.getOutputScaleX();
> float outScaleY = window.getOutputScaleY();
> stage.stageListener.changedScale(outScaleX, outScaleY);
> // We need to sync the new scales for painting
> QuantumToolkit.runWithRenderLock(() -> {
> GlassScene scene = stage.getScene();
> if (scene != null) {
> scene.entireSceneNeedsRepaint();
> scene.updateSceneState();
> }
> return null;
> });
> break;
> }

Moving this to Draft, since we will likely end up folding this into #1171

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

PR Comment: https://git.openjdk.org/jfx/pull/1189#issuecomment-1656755682


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic