-
Bug
-
Resolution: Fixed
-
P2
-
8, 9
-
x86
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8245296 | 8u271 | Kumar Abhishek | P2 | Closed | Fixed | b01 |
JDK-8246276 | 8u261 | Kumar Abhishek | P2 | Closed | Fixed | b10 |
FULL PRODUCT VERSION :
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
15.6.0 Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
If you create a stage with StageStyle.UTILITY, it is always on-top if it doesn't have an owner. Not only is it on-top of other javafx stages but also all other applications.
This may be intended but is entirely undocumented that the style will change how the window operates. Documentation makes it seem the stage style is cosmetic only.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package sample;
import javafx.application.Application;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
primaryStage.setTitle("Hello World");
primaryStage.show();
Stage dummyStage = new Stage();
dummyStage.initModality(Modality.NONE);
// by setting this to utility the stage will now always be on-top of other applications
// may not intended but it is not documented to do that
dummyStage.initStyle(StageStyle.UTILITY);
dummyStage.setAlwaysOnTop(false);
dummyStage.show();
dummyStage.requestFocus();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Create a dummy stage that is transparent with width/height 0/0 and set it as the owner of the window.
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
15.6.0 Darwin Kernel Version 15.6.0: Fri Feb 17 10:21:18 PST 2017; root:xnu-3248.60.11.4.1~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
If you create a stage with StageStyle.UTILITY, it is always on-top if it doesn't have an owner. Not only is it on-top of other javafx stages but also all other applications.
This may be intended but is entirely undocumented that the style will change how the window operates. Documentation makes it seem the stage style is cosmetic only.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package sample;
import javafx.application.Application;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
primaryStage.setTitle("Hello World");
primaryStage.show();
Stage dummyStage = new Stage();
dummyStage.initModality(Modality.NONE);
// by setting this to utility the stage will now always be on-top of other applications
// may not intended but it is not documented to do that
dummyStage.initStyle(StageStyle.UTILITY);
dummyStage.setAlwaysOnTop(false);
dummyStage.show();
dummyStage.requestFocus();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Create a dummy stage that is transparent with width/height 0/0 and set it as the owner of the window.
- backported by
-
JDK-8245296 [macos] Stages with StageStyle.UTILITY are always on-top when initialized without an owner
-
- Closed
-
-
JDK-8246276 [macos] Stages with StageStyle.UTILITY are always on-top when initialized without an owner
-
- Closed
-