0

I’m trying to use controlsfx notifications on raspi, it works fine on mac but when I run it on raspi, the notification is shown properly but the background blacks out and is only visible after the notification is timed out. And sometime it shows some flickering also. Has anyone seen such an issue?

Notifications notify = Notifications.create()
                                    .title("Title")
                                    .text("Notification test")
                                    .position(Pos.TOP_CENTER)
                          .hideAfter(javafx.util.Duration.seconds(2));

notify.showInformation();

Gaur
  • 1
  • 3
  • Which Java/JavaFX versions are you using? – José Pereda Jun 21 '21 at 08:03
  • JavaFx 11 with JDK 11 and controlsfx 11 – Gaur Jun 21 '21 at 17:17
  • Can you try adding `System.setProperty("use.egl", "true");` to your main, before the `launch` call? – José Pereda Jun 21 '21 at 17:34
  • Even after adding System.setProperty("use.egl", "true") before launch call, the issue is seen. One more thing I noticed is that my notification is always shown at the bottom left corner of the screen whatever position I provide. I've added the code for the notification. – Gaur Jun 21 '21 at 18:00
  • Can you try with a simple `ComboBox`? When you open it, you might still see the black screen around it. Also, where did you get JavaFX for ARM from? – José Pereda Jun 21 '21 at 18:03
  • @JoséPereda, My javafx application is running successfully. It's just I wanted to use some notification to show information, such as on logging in. So, I got across controlsfx as javafx do not have support for notifications. Now, when I log in, my home screen shows up and immediately notification is displayed. But for the duration when the notification is active, the whole background is blacked except the notification part (No homescreen is shown). After the notification times out, the Home screen re-appears. I've downloaded JavaFX armv6hf SDK from https://gluonhq.com/products/javafx/ – Gaur Jun 21 '21 at 18:41
  • 2
    I didn't say that your app didn't work. To isolate where that black screen comes from is better to have a simple app with a regular comboBox, and that should show it, in case you want to try it out. Where did you get JavaFX for ARM from? – José Pereda Jun 21 '21 at 18:44

1 Answers1

0

Whenever there is some additional display apart from the javafx application, the screen is blinking like the raspi is trying to switch between two programs but at a very slow rate. The issue I'm seeing whenever I'm clinking on any edittext which shows the on-screen Keyboard.

For now, I'm using JFXSnackbar instead of Notifications and it seems to be working without any issue. Thanks everyone for support.

Gaur
  • 1
  • 3
  • I have seen similar issues on the Mac when the program is running in full-screen mode. Maybe that is related. – mipa Dec 22 '21 at 12:59