On Thu, 13 Mar 2025 10:36:40 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

> Adds code to trigger a scene update when a Window is restored
> 
> This seems to solve https://bugs.openjdk.org/browse/JDK-8351867 and 
> https://bugs.openjdk.org/browse/JDK-8146479

At least on the Mac there seems to be a timing issue. If the MIMIMIZE 
notification is sent before a scheduled draw occurs the drawing code will clear 
the scene dirty bit but then skip the actual drawing since the window is 
minimized. But I've also seen cases where drawing completes before MINIMIZE is 
sent.

When the window is restored notifyRepaint will be called on Windows and Linux 
which looks like it will call entireSceneNeedsRepaint to set the scene dirty 
bit (based on my reading of the code). Windows calls notifyRepaint whenever it 
gets a WM_PAINT event and I've verified that that happens after a window is 
restored. Looking at the sources it seems that Linux calls notifyRepaint _only_ 
when a window is restored (!)

Mac never calls notifyRepaint. There's code to call it but given where it's 
located I don't think it will ever be executed.

It would be nice to get some clarification on when notifyRepaint should be 
called and get the platforms to behave more consistently.

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

PR Comment: https://git.openjdk.org/jfx/pull/1733#issuecomment-2734611810

Reply via email to