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

Touch keyboard is not shown for text components on a screen touch

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 10
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Interface Kind:
      System or security property
    • Scope:
      JDK

      Description

      Summary

      Introduce a new system property "awt.touchKeyboardAutoShowIsEnabled" allowing to completely disable the fix for JDK-8166772 which implements a support of automatic showing of the system touch keyboard on MS Windows 10/8.1/8 OS in case, if JDK-8166772 causes any regression.

      Problem

      Automatic showing of the system touch keyboard on touching Swing or AWT text components on MS Windows 10/8.1/8 OS is addressed in the bug JDK-8166772. The fix for JDK-8166772 is created and approved by 2 technical reviewers at (awt-dev@openjdk.java.net) e-mail alias by current moment. But the fix is rather big and, if it causes any regression, the system property "awt.touchKeyboardAutoShowIsEnabled" could allow to disable the fix both internally in JDK and from the side of a user, until the regression is resolved, instead of complete backing out of the fix.

      Solution

      The new system property "awt.touchKeyboardAutoShowIsEnabled":

      • is already implemented as part of the fix for JDK-8166772;
      • it accepts "true", "false" values and by default its value is considered "true", if the property is not set explicitly by the user;
      • can be set to "false" by default by a new fix, if the fix for JDK-8166772 causes a regression, and that will let to disable the fix for JDK-8166772, until the regression is resolved.

      Specification

      There are no any changes in the public API specification.

      Property is defined in "src/java.desktop/share/classes/sun/awt/SunToolkit.java" file by the changes specified below as part of the fix for JDK-8166772.

      Webrev: http://cr.openjdk.java.net/~alitvinov/8166772/jdk10/webrev.01

      
      --- old/src/java.desktop/share/classes/sun/awt/SunToolkit.java  2017-09-21 16:24:37.000000000 +0100
      +++ new/src/java.desktop/share/classes/sun/awt/SunToolkit.java  2017-09-21 16:24:37.000000000 +0100
      @@ -84,6 +84,9 @@
               if (AccessController.doPrivileged(new GetBooleanAction("sun.awt.nativedebug"))) {
                   DebugSettings.init();
               }
      +        touchKeyboardAutoShowIsEnabled = Boolean.valueOf(
      +            GetPropertyAction.privilegedGetProperty(
      +                "awt.touchKeyboardAutoShowIsEnabled", "true"));
           };
      
           /**
      @@ -1614,6 +1617,13 @@
            */
           public abstract void ungrab(Window w);
      
      +    public void showOrHideTouchKeyboard(Component comp, AWTEvent e) {}
      +
      +    private static boolean touchKeyboardAutoShowIsEnabled;
      +
      +    public static boolean isTouchKeyboardAutoShowEnabled() {
      +        return touchKeyboardAutoShowIsEnabled;
      +    }
      
           /**
            * Locates the splash screen library in a platform dependent way and closes
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alitvinov Anton Litvinov
                Reporter:
                shadowbug Shadow Bug
                Reviewed By:
                Sergey Bylokhov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: