darklaf
darklaf copied to clipboard
TransformUI causes flickering
When running with java >= 16
we can't rely on setting a delegate repaint manager as the method to do so resides in SwingUtilities3
which isn't exported by the jdk as a module. Instead we need to wrap the global RepaintManager
, which causes us to loose buffering information (and capability) resulting in flickering while resizing.
To stay compliant with module restrictions the fallback method is the standard for java >= 16
with the option to opt-in to the better approach by setting darklaf.useBufferedRepaintManage
to true
in the system properties and starting the application with
--add-exports java.desktop/com.sun.java.swing=ALL-UNNAMED
(once #246 is merged this will be --add-exports java.desktop/com.sun.java.swing=darlaf.core
)
Ideally we should find a better way to handle repaints in the TransformUI
, which supports buffering without relying on internal API.