OS: Mac OS High Sierra 10.13.3
JVM: 1.8.0_161
The JFoenix Demo main window cannot be resized or dragged. There is no resize cursor over the window edges. The window cannot be dragged either. It works on Windows 10 (the same JVM) however.
Hello,
I was not able to reproduce this issue, can you provide more details? any exception on the console?
No exception is thrown on the console.
Observation:
This is a very simple example, which has the same problem:
public class Test1 extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Button btn = new Button();
btn.setText("Test");
btn.setOnAction(event -> System.out.println("Hello!") ));
StackPane root = new StackPane();
root.getChildren().add(btn);
JFXDecorator dec = new JFXDecorator(primaryStage, root, true, true, true);
primaryStage.setTitle("JDecorator Test");
primaryStage.setScene(new Scene(dec, 300, 250));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
However, when I don't use JFXDecorator everything works.
public class Test1 extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Button btn = new Button();
btn.setText("Test");
btn.setOnAction(event -> System.out.println("Hello!") ));
StackPane root = new StackPane();
root.getChildren().add(btn);
//JFXDecorator dec = new JFXDecorator(primaryStage, root, true, true, true);
primaryStage.setTitle("JDecorator Test");
primaryStage.setScene(new Scene(root, 300, 250));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Ok, I checked this on older versions of JVM on MacOS.
It works on 1.8.0_144 but does not work on 1.8.0_161. I checked it on two MacOS machines.
Try to upgrade your JVM and maybe you will be able to reproduce it.
I updated to JDK 1.8.0_161, however still not able to reproduce.
if you can debug it from your side, and tell what's causing the issue. we might be able to fix it.
Regards,
It seems the primary stage is maximized after stage.show() if a JFXDecorator is used. Debugging the startup shows a WindowEvent coming through forcing a stage maximized state. Any ideas where this may be coming from? Can debug further with a hint from your side.
BTW. Seems to be broken on JDK9 as well.
Hello,
there are only 2 ways to trigger this event. By either triggering action the maximize button or by calling the method setMaximized of JFXDecorator (which internally fires an action event to the max button).
@svenreimers can you track down the event source?
Hi. I run into the same issue (MacOS Sierra - Java 8_171). After some debugging i found out that in 'private void handleDragEventOnDecoratorPane(MouseEvent mouseEvent)', right at the beginning theres is an early exit check '(primaryStage.isFullScreen() || mouseEvent.isStillSincePress() || primaryStage.isMaximized() || maximized)' where 'primaryStage.isMaximized()' always returns true for some reason that i could not find out. Any suggestions for a work around?
@Krisso990 can you try to add change listener to maximized property? in order to tell which code is setting it to true, it could be a JavaFX issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is still occurring. I found it in Ubuntu when using the latest versions of JFoenix and Java 1.8.0_191.
It's in the handleDragEventOnDecoratorPane(MouseEvent mouseEvent) method of the JFXDecorator. If the app was maximixed once, you can no longer drag, because "maximized" is still true. It looks like in Ubuntu for some reason the private maximized property is not being set to false when no longer full screen.
Works fine in Win 10.
Most helpful comment
This issue is still occurring. I found it in Ubuntu when using the latest versions of JFoenix and Java 1.8.0_191.
It's in the handleDragEventOnDecoratorPane(MouseEvent mouseEvent) method of the JFXDecorator. If the app was maximixed once, you can no longer drag, because "maximized" is still true. It looks like in Ubuntu for some reason the private maximized property is not being set to false when no longer full screen.
Works fine in Win 10.