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

On Windows the launcher should ask the foreground permission

XMLWordPrintable

      SceneBuilder 1.1 is packaged with the packager.
      If you open an Explorer then double click an FXML file A then SceneBuilder's launcher is called, the window comes up to front.
      Then move back to front the Explorer window and double click a second FXML layout B: the issue (see DTL-5689) is that the second SceneBuilder window is rendered behind the Explorer one, only the blinking button in task bar alerts the user.

      I suspect that the launcher code miss a call to AllowSetForegroundWindow.
      I paste below an extract of the home written launcher of SceneBuilder 1.0, which isn't produced by the FX packager. See also RT-17836 for further details. At that time simply adding the call to AllowSetForegroundWindow solved the very same issue (could it be that simple ?).

          // Allow SceneBuilder window to open to the front (see RT-17836).
          // Possibly SceneBuilder should wait a little before it calls Stage.toFront()
          // to let time the foreground permission is granted to the FX process by Windows;
          // that said the tries I've made for now seem to show such sleep statement is not
          // necessary.
          AllowSetForegroundWindow(pi.dwProcessId);

            mhowe Mark Howe (Inactive)
            yjoan Yves Joan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: