8214112: The whole text in target JPasswordField image are not selected
authorpbansal
Tue, 05 Mar 2019 14:03:21 +0530
changeset 54235 63946f20c24f
parent 54234 6b2f2ec0f618
child 54236 a5af6175d62b
8214112: The whole text in target JPasswordField image are not selected Reviewed-by: serb, psadhukhan
src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c
--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c	Tue Mar 05 13:09:15 2019 +0530
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c	Tue Mar 05 14:03:21 2019 +0530
@@ -2356,9 +2356,11 @@
 
     init_containers();
 
-    if (widget_type == TEXT_FIELD && state_type == GTK_STATE_SELECTED &&
-        color_type == TEXT_BACKGROUND) {
-        widget_type = TEXT_AREA;
+    if (gtk3_version_3_20) {
+        if ((widget_type == TEXT_FIELD || widget_type == PASSWORD_FIELD || widget_type == SPINNER_TEXT_FIELD ||
+            widget_type == FORMATTED_TEXT_FIELD) && state_type == GTK_STATE_SELECTED && color_type == TEXT_BACKGROUND) {
+            widget_type = TEXT_AREA;
+        }
     }
 
     GtkStyleContext* context = NULL;