honor the focusFollowsMouse userPreference.
authorClaus Gittinger <cg@exept.de>
Fri, 26 Mar 1999 18:54:54 +0100
changeset 1824 03630b3be319
parent 1823 770467bf0dc9
child 1825 a34e6df96a8a
honor the focusFollowsMouse userPreference.
ETxtView.st
EditField.st
EditTextView.st
ObjView.st
ObjectView.st
SelListV.st
SelectionInListView.st
--- a/ETxtView.st	Fri Mar 26 15:13:01 1999 +0100
+++ b/ETxtView.st	Fri Mar 26 18:54:54 1999 +0100
@@ -3375,9 +3375,15 @@
 !
 
 pointerEnter:state x:x y:y
-    "mouse pointer entered - request the keyboard focus"
-
-    (styleSheet at:#'editText.requestFocusOnPointerEnter' default:true) ifTrue:[
+    "mouse pointer entered - request the keyboard focus (sometimes)"
+
+    |pref|
+
+    pref := UserPreferences current focusFollowsMouse.
+    (pref == true
+    or:[pref == nil
+        and:[styleSheet at:#'editText.requestFocusOnPointerEnter' default:true]]
+    ) ifTrue:[
         (self enabled and:[readOnly not]) ifTrue:[
             self requestFocus.
         ].
@@ -4541,5 +4547,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.197 1999-03-24 20:12:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.198 1999-03-26 17:54:40 cg Exp $'
 ! !
--- a/EditField.st	Fri Mar 26 15:13:01 1999 +0100
+++ b/EditField.st	Fri Mar 26 18:54:54 1999 +0100
@@ -1570,7 +1570,15 @@
 !
 
 pointerEnter:state x:x y:y
-    (styleSheet at:#'editField.requestFocusOnPointerEnter' default:true) ifTrue:[
+    "mouse pointer entered - request the keyboard focus (sometimes)"
+
+    |pref|
+
+    pref := UserPreferences current focusFollowsMouse.
+    (pref == true
+    or:[pref == nil
+        and:[styleSheet at:#'editField.requestFocusOnPointerEnter' default:true]]
+    ) ifTrue:[
         (enabled and:[readOnly not]) ifTrue:[
             self requestFocus.
         ]
@@ -2044,5 +2052,5 @@
 !EditField class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.123 1999-03-23 12:42:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditField.st,v 1.124 1999-03-26 17:54:54 cg Exp $'
 ! !
--- a/EditTextView.st	Fri Mar 26 15:13:01 1999 +0100
+++ b/EditTextView.st	Fri Mar 26 18:54:54 1999 +0100
@@ -3375,9 +3375,15 @@
 !
 
 pointerEnter:state x:x y:y
-    "mouse pointer entered - request the keyboard focus"
-
-    (styleSheet at:#'editText.requestFocusOnPointerEnter' default:true) ifTrue:[
+    "mouse pointer entered - request the keyboard focus (sometimes)"
+
+    |pref|
+
+    pref := UserPreferences current focusFollowsMouse.
+    (pref == true
+    or:[pref == nil
+        and:[styleSheet at:#'editText.requestFocusOnPointerEnter' default:true]]
+    ) ifTrue:[
         (self enabled and:[readOnly not]) ifTrue:[
             self requestFocus.
         ].
@@ -4541,5 +4547,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.197 1999-03-24 20:12:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.198 1999-03-26 17:54:40 cg Exp $'
 ! !
--- a/ObjView.st	Fri Mar 26 15:13:01 1999 +0100
+++ b/ObjView.st	Fri Mar 26 18:54:54 1999 +0100
@@ -1325,7 +1325,9 @@
 pointerEnter:state x:x y:y
     "mouse pointer entered - request the keyboard focus"
 
-    self requestFocus.
+    UserPreferences current focusFollowsMouse == true ifTrue:[
+        self requestFocus.
+    ].
     super pointerEnter:state x:x y:y
 
 
@@ -3079,5 +3081,5 @@
 !ObjectView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ObjView.st,v 1.65 1999-03-25 14:33:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ObjView.st,v 1.66 1999-03-26 17:54:26 cg Exp $'
 ! !
--- a/ObjectView.st	Fri Mar 26 15:13:01 1999 +0100
+++ b/ObjectView.st	Fri Mar 26 18:54:54 1999 +0100
@@ -1325,7 +1325,9 @@
 pointerEnter:state x:x y:y
     "mouse pointer entered - request the keyboard focus"
 
-    self requestFocus.
+    UserPreferences current focusFollowsMouse == true ifTrue:[
+        self requestFocus.
+    ].
     super pointerEnter:state x:x y:y
 
 
@@ -3079,5 +3081,5 @@
 !ObjectView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.65 1999-03-25 14:33:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.66 1999-03-26 17:54:26 cg Exp $'
 ! !
--- a/SelListV.st	Fri Mar 26 15:13:01 1999 +0100
+++ b/SelListV.st	Fri Mar 26 18:54:54 1999 +0100
@@ -2479,7 +2479,13 @@
      Since I process keyboard events (to position on an entry and/or
      for scrolling), request the focus."
 
-    (styleSheet at:#'selection.requestFocusOnPointerEnter' default:true) ifTrue:[
+    |pref|
+
+    pref := UserPreferences current focusFollowsMouse.
+    (pref == true
+    or:[pref == nil
+        and:[styleSheet at:#'selection.requestFocusOnPointerEnter' default:true]]
+    ) ifTrue:[
         self requestFocus.
     ].
     super pointerEnter:state x:x y:y
@@ -3629,5 +3635,5 @@
 !SelectionInListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.142 1999-03-22 19:37:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.143 1999-03-26 17:54:13 cg Exp $'
 ! !
--- a/SelectionInListView.st	Fri Mar 26 15:13:01 1999 +0100
+++ b/SelectionInListView.st	Fri Mar 26 18:54:54 1999 +0100
@@ -2479,7 +2479,13 @@
      Since I process keyboard events (to position on an entry and/or
      for scrolling), request the focus."
 
-    (styleSheet at:#'selection.requestFocusOnPointerEnter' default:true) ifTrue:[
+    |pref|
+
+    pref := UserPreferences current focusFollowsMouse.
+    (pref == true
+    or:[pref == nil
+        and:[styleSheet at:#'selection.requestFocusOnPointerEnter' default:true]]
+    ) ifTrue:[
         self requestFocus.
     ].
     super pointerEnter:state x:x y:y
@@ -3629,5 +3635,5 @@
 !SelectionInListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.142 1999-03-22 19:37:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.143 1999-03-26 17:54:13 cg Exp $'
 ! !