[External] : Re: MacOS: Title bar flickering when animation is playing
Andy Goryachev
andy.goryachev at oracle.com
Fri Jan 24 19:01:38 UTC 2025
That's great, thank you Pascal!
-andy
From: Pascal <pascal.gruen at gmail.com>
Date: Friday, January 24, 2025 at 11:00
To: Andy Goryachev <andy.goryachev at oracle.com>
Cc: openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
Subject: [External] : Re: MacOS: Title bar flickering when animation is playing
Hello Andy,
I tried to reproduce the issue with the latest JavaFX build, but
accidentally downloaded an older one, openjfx-24-ea+19. With this, the
flickering is still happening.
However, today I noticed my mistake and downloaded the latest,
openjfx-24-ea+25, and with that version I cannot reproduce the error
anymore, the flickering is gone. So it looks like it's already fixed,
everything is fine.
Thanks for your help!
Best regards,
Pascal
Am Di., 21. Jan. 2025 um 20:03 Uhr schrieb Andy Goryachev
<andy.goryachev at oracle.com>:
>
> Dear Pascal:
>
>
>
> I cannot see the flicker (macOS 15.1.1 M1, using the laptop retina monitor with scale=2 or the external monitor at scale=1), running the latest JFX master branch.
>
> Actually, I don't see much change except for the button - the inner shadow of the window background looks unchanged.
>
>
>
> Could it be something that was fixed? Or due to x86 driver in your mac? Or may be external monitor connection?
>
>
>
> I can help with creating a JBS ticket once I can reproduce it.
>
>
>
> Cheers,
>
> -andy
>
>
>
>
>
> From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Pascal <pascal.gruen at gmail.com>
> Date: Saturday, January 18, 2025 at 07:14
> To: openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
> Subject: MacOS: Title bar flickering when animation is playing
>
> Hello all,
>
> I have noticed a weird flickering behaviour on MacOS when playing
> animations and having set an effect on the background (both needed to
> be true during my experimentation).
>
> It looks like JavaFX is drawing on the lower lines of the title bar
> that are managed by the OS and during animation playing, JavaFX
> "wins", overwriting the OS painting. Once the animation is finished,
> the OS painting takes over again, resulting in a flicker effect
> whenever an animation starts or stops.
>
> Unfortunately, I cannot take a screenshot or screen recording, as the
> flickering doesn't happen when screen recording is active. Somehow,
> the painting process is different then.
>
> I tested different resolutions and it looks to me that the flickering
> happens independently of resolution and HiDPI setting.
>
> It would be nice if someone could open a bug for this.
>
> Below is the code to reproduce the behaviour (hover over the button to
> see the flickering).
>
>
> public class FlickerDemo extends Application {
> @Override
> public void start(Stage primaryStage) {
> Button button = new Button("Button");
>
> Transition transition = new Transition() {
> {
> setCycleDuration(Duration.millis(500));
> }
>
> @Override
> protected void interpolate(double frac) {
> button.setOpacity(Math.min(1, frac + 0.5));
> }
> };
>
> button.setOnMouseEntered(_ -> {
> transition.setRate(1.0);
> transition.play();
> });
>
> button.setOnMouseExited(_ -> {
> transition.setRate(-1.0);
> transition.play();
> });
>
> StackPane root = new StackPane(button);
> root.setBackground(new Background(new
> BackgroundFill(Color.WHITE, null, null)));
> root.setEffect(new InnerShadow());
>
> Scene scene = new Scene(root, 800, 600);
> primaryStage.setScene(scene);
> primaryStage.show();
> }
> }
>
>
> Thanks a lot!
>
> Pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250124/9151df53/attachment-0001.htm>
More information about the openjfx-dev
mailing list