<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
{font-family:"Iosevka Fixed SS16";
panose-1:2 0 5 9 3 0 0 0 0 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Aptos",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Iosevka Fixed SS16";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Dear Pascal:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Actually, I don't see much change except for the button - the inner shadow of the window background looks unchanged.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Could it be something that was fixed? Or due to x86 driver in your mac? Or may be external monitor connection?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">I can help with creating a JBS ticket once I can reproduce it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">openjfx-dev <openjfx-dev-retn@openjdk.org> on behalf of Pascal <pascal.gruen@gmail.com><br>
<b>Date: </b>Saturday, January 18, 2025 at 07:14<br>
<b>To: </b>openjfx-dev@openjdk.org <openjfx-dev@openjdk.org><br>
<b>Subject: </b>MacOS: Title bar flickering when animation is playing<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hello all,<br>
<br>
I have noticed a weird flickering behaviour on MacOS when playing<br>
animations and having set an effect on the background (both needed to<br>
be true during my experimentation).<br>
<br>
It looks like JavaFX is drawing on the lower lines of the title bar<br>
that are managed by the OS and during animation playing, JavaFX<br>
"wins", overwriting the OS painting. Once the animation is finished,<br>
the OS painting takes over again, resulting in a flicker effect<br>
whenever an animation starts or stops.<br>
<br>
Unfortunately, I cannot take a screenshot or screen recording, as the<br>
flickering doesn't happen when screen recording is active. Somehow,<br>
the painting process is different then.<br>
<br>
I tested different resolutions and it looks to me that the flickering<br>
happens independently of resolution and HiDPI setting.<br>
<br>
It would be nice if someone could open a bug for this.<br>
<br>
Below is the code to reproduce the behaviour (hover over the button to<br>
see the flickering).<br>
<br>
<br>
public class FlickerDemo extends Application {<br>
@Override<br>
public void start(Stage primaryStage) {<br>
Button button = new Button("Button");<br>
<br>
Transition transition = new Transition() {<br>
{<br>
setCycleDuration(Duration.millis(500));<br>
}<br>
<br>
@Override<br>
protected void interpolate(double frac) {<br>
button.setOpacity(Math.min(1, frac + 0.5));<br>
}<br>
};<br>
<br>
button.setOnMouseEntered(_ -> {<br>
transition.setRate(1.0);<br>
transition.play();<br>
});<br>
<br>
button.setOnMouseExited(_ -> {<br>
transition.setRate(-1.0);<br>
transition.play();<br>
});<br>
<br>
StackPane root = new StackPane(button);<br>
root.setBackground(new Background(new<br>
BackgroundFill(Color.WHITE, null, null)));<br>
root.setEffect(new InnerShadow());<br>
<br>
Scene scene = new Scene(root, 800, 600);<br>
primaryStage.setScene(scene);<br>
primaryStage.show();<br>
}<br>
}<br>
<br>
<br>
Thanks a lot!<br>
<br>
Pascal<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>