Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8325115

Cmd-Q does not trigger Scene.setOnCloseRequest()

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      MacOS

      A DESCRIPTION OF THE PROBLEM :
      When closing a scene unsing CMD-Q on MacOS, I want to let the user confirm to save the project modifications to file. This works fine using Scene.setOnCloseRequest() on Windows, but not on MacOs. How can I do the same on MacOs?
      stage.setOnCloseRequest(event -> {
                  if (!acceptClosingFrame()) {
                      event.consume();
                  }
              });



      FREQUENCY : always


            pnarayanaswa Praveen Narayanaswamy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: