mbien commented on code in PR #9303:
URL: https://github.com/apache/netbeans/pull/9303#discussion_r3012910100


##########
platform/core.startup/src/org/netbeans/core/startup/Splash.java:
##########
@@ -147,35 +155,59 @@ final int getProgress() {
     /** Enables or disables splash component and its progress
      * animation
      */
-    public void setRunning(boolean running) {
-        if (CLIOptions.isNoSplash()) {
+    public void setRunning(boolean show) {
+        if (CLIOptions.isNoSplash() || GraphicsEnvironment.isHeadless()) {
             return;
         }
-        if (comp == null) {
-            // ignore all manipulations
-            return;
+        Runnable edtAction;
+        if (show) {
+            edtAction = () -> {
+                if (painter == null) {
+                    try {
+                        SplashScreen splashScreen = 
SplashScreen.getSplashScreen();
+                        if (splashScreen != null) {
+                            painter = new 
SplashPainter(splashScreen.createGraphics(), null, false);

Review Comment:
   a little bit. I am not sure what the original logic was but what happens is 
the following:
   
   I added a green version of the splash and passed 
`-J-splash:/home/mbien/splash_green.gif` to the dev build of this PR. The green 
version popped up first, a fraction of a second later the regular NB splash 
appeared over the first. (the green splash had the wrong size, using the png 
1:1, so I did see that it remained behind the regular NB splash which is scaled 
by the `Splash` class)
   
   note: when I used `--spash`, the splash (both of them btw) got centered 
between my two screens. Without it, it centered on the active screen.
   
   keep in mind this happens really fast. If that is the desired effect, it 
still works.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to