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

Gtk: Linux: bug on consuming WINDOW_CLOSE_REQUEST event

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 7u6
    • javafx
    • Ubuntu 11.10, KDE version 4.7.4

      Steps for reproduce:
      1. add onCloseRequest handler with consuming incoming event
      2. launch application
      3. press close button ("x" icon)
      Experted result: nothing happen (window is showing)
      Actual result: window is closed, but application is still in running processes.
      Code snippet:
      ...
       @Override
      public void start(final Stage stage) throws Exception {
      ...
      stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
      @Override
      public void handle(WindowEvent event) {
      System.out.println("close request: exit consumed");
      event.consume();
      }
      });
      stage.show();
      }

            azvegint Alexander Zvegintsev
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: