Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8222209: Repaint properly when JFXPanel moves to another screen #1189

Closed
wants to merge 1 commit into from

Conversation

hjohn
Copy link
Collaborator

@hjohn hjohn commented Jul 28, 2023

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;
        }

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Integration blocker

 ⚠️ Title mismatch between PR and JBS for issue JDK-8222209

Issue

  • JDK-8222209: JavaFX is rendered blurry on systems with monitors in different configuration (Bug - P4) ⚠️ Title mismatch between PR and JBS.

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1189/head:pull/1189
$ git checkout pull/1189

Update a local copy of the PR:
$ git checkout pull/1189
$ git pull https://git.openjdk.org/jfx.git pull/1189/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1189

View PR using the GUI difftool:
$ git pr show -t 1189

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1189.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 28, 2023

👋 Welcome back jhendrikx! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@hjohn hjohn changed the title Repaint properly when JFXPanel moves to another screen JDK-8222209: Repaint properly when JFXPanel moves to another screen Jul 28, 2023
@openjdk openjdk bot added the rfr Ready for review label Jul 28, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 28, 2023

Webrevs

@kevinrushforth kevinrushforth self-requested a review July 29, 2023 14:47
@kevinrushforth
Copy link
Member

kevinrushforth commented Jul 29, 2023

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

@kevinrushforth kevinrushforth marked this pull request as draft July 29, 2023 15:13
@kevinrushforth
Copy link
Member

@prsadhuk Please take a look

@openjdk openjdk bot removed the rfr Ready for review label Jul 29, 2023
@hjohn hjohn closed this Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants