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

[macos10.15] Stage with ownership disappears when moved to another screen

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x_10.15

      Description

      ADDITIONAL SYSTEM INFORMATION :
      MacOS 10.15.5

      A DESCRIPTION OF THE PROBLEM :
      - My application opens a dialog / a popup (a new Stage) with ownership set (on the primaryStage for instance)
      - I move the new dialog to another screen: it disappears (the main stage is still visible)

      The "popup" stage title is still visible in the toolbar (with the main dialog), but even clicking on it doesn't bring it back. If I move the primary stage to this other screen, then the "popup" reappears again. It's possible to make them both visible (on different screens) after a few manipulations but it's kinda odd.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Have at least 2 screens. Start the example application (or just create an app that opens a new Stage with ownership), click on the button to open the popup, move the popup to another screen.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The new stage still visible on the other screen
      ACTUAL -
      The new stage is hidden on the other screen just after moving

      ---------- BEGIN SOURCE ----------
      class TestApp : Application() {
      override fun start(primaryStage: Stage) {
      primaryStage.scene = Scene(HBox().apply {
      val btn = Button("click me")
      children.add(btn)
      btn.onAction = EventHandler {
      val popup = Stage(StageStyle.DECORATED)
      popup.initOwner(primaryStage)
      popup.scene = Scene(Label("popup"), 200.0, 200.0)
      popup.show()
      }
      }, 400.0, 400.0)
      primaryStage.show()
      }
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Move back the main window to the other screen

      FREQUENCY : always


        Attachments

          Activity

            People

            Assignee:
            kcr Kevin Rushforth
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: