0

There is possiblity to run/start Java(JavaFX) program and do not add it to AltTab Cycle? I would like create desktop widget. :)

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • Which operating system, and which desktop? You have added "windows" and "linux" tags, but the techniques you will need to do this will highly specific to the operating system, and probably to the exact desktop in use. – Kevin Boone Oct 09 '17 at 10:45
  • Both Windows 10 and Linux Mint 18 Cinnamon:) – PiekarzBabeczek Oct 09 '17 at 13:46
  • I suspect you'll have to make a decision, because the methods will be completely different. In the Linux case, you'll need to look up how to proceed for the specific window manager that is used. For Windows, I have a nasty suspicion that desktop widgets can only be implemented in JavaScript :/ – Kevin Boone Oct 09 '17 at 13:55
  • I know that Windows supports only JavaScripts but there is posibility to skip adding my program to cycle, I can "simulate" widget. I guess. – PiekarzBabeczek Oct 09 '17 at 14:10
  • There is some discussion of the Alt+Tab thing here: https://stackoverflow.com/questions/357076/best-way-to-hide-a-window-from-the-alt-tab-program-switcher – Kevin Boone Oct 09 '17 at 14:29

1 Answers1

0

There is solution:

    primaryStage.initStyle(StageStyle.UTILITY); // prevent system from adding window to cycle
    primaryStage.iconifiedProperty().addListener(new ChangeListener<Boolean>() {
            @Override
            public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
                primaryStage.setIconified(false); //if window was minimized by user example: user pressed "super+d" window is still visible like widget 
            }
        });