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

Control at startup whether JPopupMenu will pop up over the taskbar or avoid it

    XMLWordPrintable

Details

    Description

      A DESCRIPTION OF THE PROBLEM :
      I propose the creation of a new system property that could be set from the command line with -D to control whether JPopupMenu can appear over the taskbar or whether the insets are used to move it away from the taskbar.

      For instance javax.swing.popupOverTaskBar (boolean) could be used.

      We are currently having a problem on Cinnamon where the menu pops up over the taskbar, but clicks on the the overlapping area that the user expects will be sent to the popup are actually sent to the taskbar.

      The current Swing code queries the security manager in the method SunToolkit.canPopupOverlapTaskBar() and if the setWindowAlwaysOnTop permission is allowed (also referred to as AWTPermissions.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION in Java 17 or in Java 8 SecurityConstants.AWT.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION) the menu is popped up over the taskbar.

      To solve our problem we are setting a custom SecurityManager that doesn't allow that permission. Since the SecurityManager is going away, that workaround will eventually stop working. It also doesn't make sense to control a popup location by the security manager, especially with that permission.


      Attachments

        Activity

          People

            psadhukhan Prasanta Sadhukhan
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: