Avoid pointer and keyboard grabbing if not necessary
authorStefan Vogel <sv@exept.de>
Tue, 03 Feb 1998 00:46:38 +0100
changeset 1442 7dfbc21dfdc6
parent 1441 fdb91f9d5360
child 1443 f6ff48dfde38
Avoid pointer and keyboard grabbing if not necessary and impossible.
PopUpMenu.st
--- a/PopUpMenu.st	Tue Feb 03 00:33:03 1998 +0100
+++ b/PopUpMenu.st	Tue Feb 03 00:46:38 1998 +0100
@@ -1273,10 +1273,13 @@
 regainControl
     device ungrabPointer.
     device ungrabKeyboard.
-    device grabPointerInView:self.
-    device grabKeyboardInView:self.
+    shown ifTrue:[
+        device grabPointerInView:self.
+        device grabKeyboardInView:self.
+    ].
 
-    "Modified: 20.11.1997 / 00:32:32 / cg"
+    "Modified: / 20.11.1997 / 00:32:32 / cg"
+    "Modified: / 2.2.1998 / 23:52:28 / stefan"
 ! !
 
 !PopUpMenu methodsFor:'private accessing'!
@@ -1342,5 +1345,5 @@
 !PopUpMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.70 1997-12-08 17:30:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.71 1998-02-02 23:46:38 stefan Exp $'
 ! !