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

mvm-on: Background MServer will launch UI tasks in the background without focus

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • hs20
    • hs19
    • hotspot
    • team
    • generic
    • generic

      Starting an UI application using MServer, the application may be launched on background, without focus.

      Here are the steps to reproduce:

      1. Open command console, and start MServer
      2. Move above console to background
      3. Open another command console
      4. Run an UI application with -XUseMServer, such as ${MVM_HOME}/bin/java -XUseMServer -jar SwingSet2.jar

      You can notice that the application is launched behine command console.

      The problem is due to the UI application is actually launched from MServer, which is on the background.
      The fix is to utilize Windows APIs AllowSetForegroundWindow/SetForegroundWindow to have launcher grant permission to MServer, allows MServer to show window above launcher.

            zgu Zhengyu Gu
            zgu Zhengyu Gu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: